summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-09-26 18:32:12 -0500
committerDave Parks <davep@lindenlab.com>2011-09-26 18:32:12 -0500
commit8dbfa022778f2a7fcd5d2b527045724551279412 (patch)
tree4e88cb98b66cff493887a93572ffc4c39c951a8e /indra/newview/app_settings
parentc7a16ef091409f55427f7cf0e9057130b47d2574 (diff)
parent54ba56dbe995a3d215f85932c83948145a871ac4 (diff)
merge
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
index e4db326bed..57b3a6d001 100644
--- a/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
@@ -26,6 +26,9 @@
VARYING float fog_depth;
+uniform vec4 waterFogColor;
+uniform float waterFogEnd;
+
vec4 applyWaterFog(vec4 color)
{
// GL_EXP2 Fog
@@ -33,9 +36,9 @@ vec4 applyWaterFog(vec4 color)
// GL_EXP Fog
// float fog = exp(-gl_Fog.density * fog_depth);
// GL_LINEAR Fog
- float fog = (gl_Fog.end - fog_depth) * gl_Fog.scale;
+ float fog = (waterFogEnd - fog_depth) * gl_Fog.scale;
fog = clamp(fog, 0.0, 1.0);
- color.rgb = mix(gl_Fog.color.rgb, color.rgb, fog);
+ color.rgb = mix(waterFogColor.rgb, color.rgb, fog);
return color;
}