From dbb72176e8086b9a92e301c689e63c16dc704a98 Mon Sep 17 00:00:00 2001
From: Graham Linden <graham@lindenlab.com>
Date: Thu, 25 Apr 2019 14:29:05 -0700
Subject: [PATCH] SL-11051

Fix alpha tests in alpha mask shadow shader to not include potentially incorrect vert color alpha in decision.
---
 .../shaders/class1/deferred/shadowAlphaMaskF.glsl             | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
index 1791d3e3152..dd762958c4c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
@@ -45,7 +45,7 @@ VARYING vec2 vary_texcoord0;
 
 void main() 
 {
-	float alpha = diffuseLookup(vary_texcoord0.xy).a * vertex_color.a;
+	float alpha = diffuseLookup(vary_texcoord0.xy).a;
 
 	if (alpha < 0.05) // treat as totally transparent
 	{
@@ -60,6 +60,8 @@ void main()
 	  }
 	}
 
+    alpha *= vertex_color.a;
+
 	frag_color = vec4(1,1,1,1);
 	
 #if !defined(DEPTH_CLAMP)
-- 
GitLab