playcanvas
Version:
Open-source WebGL/WebGPU 3D engine for the web
45 lines (36 loc) • 959 B
JavaScript
var gsplatOutput_default = (
/* wgsl */
`
// prepare the output color for the given gamma-space color
fn prepareOutputFromGamma(gammaColor: vec3f, depth: f32) -> vec3f {
var color = gammaColor;
// decode to linear when we need linear-space processing
color = decodeGamma3(color);
// apply fog in linear space
color = addFog(color, depth);
// apply tonemapping
color = toneMap(color);
// encode to gamma when needed
color = gammaCorrectOutput(color);
return color;
}
`
);
export {
gsplatOutput_default as default
};