summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl37
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl4
2 files changed, 23 insertions, 18 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
index 33b97aefcb..73e5b401c0 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
@@ -54,35 +54,44 @@ vec3 fullbrightScaleSoftClip(vec3 light);
uniform float minimum_alpha;
#endif
+#ifdef IS_ALPHA
+void waterClip(vec3 pos);
+#endif
+
void main()
{
+
+#ifdef IS_ALPHA
+ waterClip(vary_position.xyz);
+#endif
+
#ifdef HAS_DIFFUSE_LOOKUP
- vec4 color = diffuseLookup(vary_texcoord0.xy);
+ vec4 color = diffuseLookup(vary_texcoord0.xy);
#else
- vec4 color = texture2D(diffuseMap, vary_texcoord0.xy);
+ vec4 color = texture2D(diffuseMap, vary_texcoord0.xy);
#endif
- float final_alpha = color.a * vertex_color.a;
+ float final_alpha = color.a * vertex_color.a;
#ifdef HAS_ALPHA_MASK
- if (color.a < minimum_alpha)
- {
- discard;
- }
+ if (color.a < minimum_alpha)
+ {
+ discard;
+ }
#endif
- color.rgb *= vertex_color.rgb;
+ color.rgb *= vertex_color.rgb;
#ifdef WATER_FOG
- vec3 pos = vary_position;
- vec4 fogged = applyWaterFogView(pos, vec4(color.rgb, final_alpha));
- color.rgb = fogged.rgb;
- color.a = fogged.a;
+ vec3 pos = vary_position;
+ vec4 fogged = applyWaterFogView(pos, vec4(color.rgb, final_alpha));
+ color.rgb = fogged.rgb;
+ color.a = fogged.a;
#else
color.a = final_alpha;
#endif
- frag_color.rgb = srgb_to_linear(color.rgb);
- frag_color.a = color.a;
+ frag_color.rgb = srgb_to_linear(color.rgb);
+ frag_color.a = color.a;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl
index e71636f2c9..e565722164 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl
@@ -38,9 +38,7 @@ void calcAtmospherics(vec3 inPositionEye);
vec3 atmosAmbient();
vec3 atmosAffectDirectionalLight(float lightIntensity);
-#ifdef WATER_FOG
VARYING vec3 vary_position;
-#endif
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
@@ -66,9 +64,7 @@ void main()
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
#endif
-#ifdef WATER_FOG
vary_position = pos.xyz;
-#endif
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;