summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/lighting/lightWaterNonIndexedF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/lighting/lightWaterNonIndexedF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightWaterNonIndexedF.glsl12
1 files changed, 4 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterNonIndexedF.glsl
index af5da1411b..4888fa547c 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightWaterNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterNonIndexedF.glsl
@@ -23,14 +23,10 @@
* $/LicenseInfo$
*/
-#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
-#else
-#define frag_color gl_FragColor
-#endif
-VARYING vec4 vertex_color;
-VARYING vec2 vary_texcoord0;
+in vec4 vertex_color;
+in vec2 vary_texcoord0;
uniform sampler2D diffuseMap;
@@ -39,10 +35,10 @@ vec4 applyWaterFog(vec4 color);
void default_lighting_water()
{
- vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color;
+ vec4 color = texture(diffuseMap,vary_texcoord0.xy) * vertex_color;
color.rgb = atmosLighting(color.rgb);
- frag_color = applyWaterFog(color);
+ frag_color = max(applyWaterFog(color), vec4(0));
}