summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl21
1 files changed, 16 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl
index da76a977b6..00609e93cd 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl
@@ -22,14 +22,25 @@
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor
+#endif
-uniform sampler2D diffuseMap;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
-void default_lighting_water()
+vec3 atmosLighting(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void default_lighting_water()
{
- vec4 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
- gl_FragColor = color;
+ vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
+
+ color.rgb = atmosLighting(color.rgb);
+
+ frag_color = applyWaterFog(color);
}