From 40799b97c188bb3c0a4b2d00a35bcc41be461f08 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 19 Dec 2022 15:27:43 -0600 Subject: SL-18779 Fix for water fog staying bright when sun is dark. --- .../app_settings/shaders/class1/environment/waterFogF.glsl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/app_settings/shaders/class1/environment') 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 -- cgit v1.2.3