diff options
author | Dave Parks <davep@lindenlab.com> | 2022-12-19 15:27:43 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-12-19 15:27:43 -0600 |
commit | 40799b97c188bb3c0a4b2d00a35bcc41be461f08 (patch) | |
tree | fb94d0807e353076a63f8d08ae104f25d76b3d60 /indra/newview/app_settings/shaders/class2 | |
parent | 2de9e631d91cab993257eea82cb5356ca9f73fd0 (diff) |
SL-18779 Fix for water fog staying bright when sun is dark.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl index 25b0a0b970..076b976dc4 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl @@ -72,7 +72,7 @@ uniform vec3 light_diffuse[8]; void waterClip(vec3 pos); #ifdef WATER_FOG -vec4 applyWaterFogViewLinear(vec3 pos, vec4 color); +vec4 applyWaterFogViewLinear(vec3 pos, vec4 color, vec3 sunlit); #endif vec3 srgb_to_linear(vec3 c); @@ -226,7 +226,7 @@ void main() vec4 diffuse_linear = vec4(srgb_to_linear(diffuse_srgb.rgb), diffuse_srgb.a); - vec3 light_dir = (sun_up_factor == 1) ? sun_dir: moon_dir; + vec3 light_dir = (sun_up_factor == 1) ? sun_dir: moon_dir; // TODO -- factor out "sun_up_factor" and just send in the appropriate light vector float final_alpha = diffuse_linear.a; @@ -295,7 +295,7 @@ void main() #endif // !defined(LOCAL_LIGHT_KILL) #ifdef WATER_FOG - color = applyWaterFogViewLinear(pos.xyz, color); + color = applyWaterFogViewLinear(pos.xyz, color, sunlit); #endif // WATER_FOG #endif // #else // FOR_IMPOSTOR |