playcanvas
Version:
Open-source WebGL/WebGPU 3D engine for the web
41 lines (31 loc) • 930 B
JavaScript
var gsplatOutputVS = /* glsl */ `
// prepare the output color for the given gamma-space color
vec3 prepareOutputFromGamma(vec3 gammaColor, float depth) {
vec3 color = gammaColor;
// decode to linear when we need linear-space processing
color = decodeGamma(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 };