summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/environment
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-12-19 15:27:43 -0600
committerDave Parks <davep@lindenlab.com>2022-12-19 15:27:43 -0600
commit40799b97c188bb3c0a4b2d00a35bcc41be461f08 (patch)
treefb94d0807e353076a63f8d08ae104f25d76b3d60 /indra/newview/app_settings/shaders/class1/environment
parent2de9e631d91cab993257eea82cb5356ca9f73fd0 (diff)
SL-18779 Fix for water fog staying bright when sun is dark.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/environment')
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
index 4a0bb3fe98..e1cdeddcea 100644
--- a/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
@@ -72,7 +72,7 @@ vec4 applyWaterFogView(vec3 pos, vec4 color)
return color;
}
-vec4 applyWaterFogViewLinear(vec3 pos, vec4 color)
+vec4 applyWaterFogViewLinear(vec3 pos, vec4 color, vec3 sunlit)
{
if (dot(pos, waterPlane.xyz) + waterPlane.w > 0.0)
{
@@ -101,6 +101,7 @@ vec4 applyWaterFogViewLinear(vec3 pos, vec4 color)
float ks = waterFogKS;
vec4 kc = waterFogColor;
kc.rgb = srgb_to_linear(kc.rgb); // TODO -- pass in waterFogColor linear
+ kc.rgb *= sunlit;
float F = 0.98;
@@ -117,6 +118,11 @@ vec4 applyWaterFogViewLinear(vec3 pos, vec4 color)
return color;
}
+vec4 applyWaterFogViewLinear(vec3 pos, vec4 color)
+{
+ return applyWaterFogViewLinear(pos, color, vec3(1));
+}
+
vec4 applyWaterFog(vec4 color)
{
//normalize view vector