diff options
author | Dave Parks <davep@lindenlab.com> | 2011-09-26 18:31:55 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-09-26 18:31:55 -0500 |
commit | 54ba56dbe995a3d215f85932c83948145a871ac4 (patch) | |
tree | c6162c3b56599db1b21f707e1c8b0b6f04a85064 /indra/newview/app_settings/shaders/class1/environment | |
parent | 56191701bcbc0ef1b6872cc6bfac1d18f636fd12 (diff) |
SH-2244 changes to run in a core context on AMD hardware without generating deprecation or performance warnings
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/environment')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl | 7 |
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; } |