summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
index 32e9714a75..1a344045fe 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
@@ -48,6 +48,24 @@ void main()
discard;
}
+#if !defined(IS_FULLBRIGHT)
+ alpha *= vertex_color.a;
+#endif
+
+ if (alpha < 0.05) // treat as totally transparent
+ {
+ discard;
+ }
+
+ if (alpha < 0.88) // treat as semi-transparent
+ {
+ if (fract(0.5*floor(target_pos_x / post_pos.w )) < 0.25)
+ {
+ discard;
+ }
+ }
+
+
frag_color = vec4(1,1,1,1);
#if !defined(DEPTH_CLAMP)