mirror of
https://github.com/galacean/engine.git
synced 2026-05-07 06:30:25 +08:00
fix: refractionTransmitted need linear space (#2548)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user