diff --git a/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
index 4a0bb3fe98649459217f2a18610bcc0d9b1c03ce..e1cdeddcea739a8800b54655fa81f15a068c4618 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
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index 25b0a0b970d65277c929eda336baac43411dcbc8..076b976dc4576716fb4a0ca6c60938813cd7e555 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
diff --git a/indra/newview/app_settings/shaders/class3/environment/waterF.glsl b/indra/newview/app_settings/shaders/class3/environment/waterF.glsl
index dbe0929657ed8ba998d40da97edf3de7b2dc9056..85c3f428014bb51bee9a0424223e82f293f18a1d 100644
--- a/indra/newview/app_settings/shaders/class3/environment/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class3/environment/waterF.glsl
@@ -34,7 +34,7 @@ out vec4 frag_color;
 vec3 scaleSoftClipFragLinear(vec3 l);
 vec3 atmosFragLightingLinear(vec3 light, vec3 additive, vec3 atten);
 void calcAtmosphericVarsLinear(vec3 inPositionEye, vec3 norm, vec3 light_dir, out vec3 sunlit, out vec3 amblit, out vec3 atten, out vec3 additive);
-vec4 applyWaterFogViewLinear(vec3 pos, vec4 color);
+vec4 applyWaterFogViewLinear(vec3 pos, vec4 color, vec3 sunlit);
 
 // PBR interface
 vec3 pbrIbl(vec3 diffuseColor,
@@ -179,7 +179,14 @@ void main()
     vec2 distort2 = distort + waver.xy * refScale / max(dmod, 1.0);
 
     distort2 = clamp(distort2, vec2(0), vec2(0.999));
- 
+
+    vec3 sunlit;
+    vec3 amblit;
+    vec3 additive;
+    vec3 atten;
+
+    calcAtmosphericVarsLinear(pos.xyz, wavef, vary_light_dir, sunlit, amblit, additive, atten);
+
 #ifdef TRANSPARENT_WATER
     vec4 fb = texture2D(screenTex, distort2);
     float depth = texture2D(screenDepth, distort2).r;
@@ -194,18 +201,11 @@ void main()
         refPos = getPositionWithNDC(vec3(distort2 * 2.0 - vec2(1.0), depth * 2.0 - 1.0));
     }
 
-    fb = applyWaterFogViewLinear(refPos, fb);
+    fb = applyWaterFogViewLinear(refPos, fb, sunlit);
 #else
     vec4 fb = vec4(waterFogColorLinear.rgb, 0.0);
 #endif
 
-    vec3 sunlit;
-    vec3 amblit;
-    vec3 additive;
-    vec3 atten;
-
-    calcAtmosphericVarsLinear(pos.xyz, wavef, vary_light_dir, sunlit, amblit, additive, atten);
-    sunlit = vec3(1); // TODO -- figure out why sunlit is breaking at some view angles
     vec3 v = -viewVec;
     float NdotV = clamp(abs(dot(wavef.xyz, v)), 0.001, 1.0);