fix: refractionTransmitted need linear space (#2548)

This commit is contained in:
zhuxudong
2025-02-11 11:31:12 +08:00
committed by GitHub
parent 986c4cb95d
commit 17ccec5fdf

View File

@@ -20,6 +20,9 @@
// Sample the opaque texture to get the transmitted light
vec3 refractionTransmitted = texture2D(camera_OpaqueTexture, refractionCoords).rgb;
#ifndef ENGINE_IS_COLORSPACE_GAMMA
refractionTransmitted = gammaToLinear(vec4(refractionTransmitted, 1.0)).rgb;
#endif
refractionTransmitted *= material.diffuseColor;
// Use specularFGD as an approximation of the fresnel effect