playcanvas
Version:
Open-source WebGL/WebGPU 3D engine for the web
41 lines (31 loc) • 938 B
JavaScript
var gsplatOutputVS = /* 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 { gsplatOutputVS as default };