From c27d0874bc292738fc5efb8c90a6379a7829a646 Mon Sep 17 00:00:00 2001
From: Eric Tulla <tulla@lindenlab.com>
Date: Mon, 26 Oct 2009 18:41:26 +0000
Subject: [PATCH] Fix for DEV-39996 / EXT-942.  Avatar hair and eyelashes had
 lost partial transparency. -Reviewed by nyx (simpler xml fix for hair
 suggested by him as well)

---
 indra/newview/character/avatar_lad.xml | 7 +++++++
 indra/newview/lltexlayer.cpp           | 3 ++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml
index f3bfa37ceaf..c43ba279846 100644
--- a/indra/newview/character/avatar_lad.xml
+++ b/indra/newview/character/avatar_lad.xml
@@ -5588,6 +5588,13 @@
        local_texture="hair_grain" />
     </layer>
 
+    <layer
+       name="hair texture alpha layer"
+       visibility_mask="TRUE">
+      <texture
+         local_texture="hair_grain" />
+    </layer>
+
     <layer
        name="hair alpha"
        visibility_mask="TRUE">
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 17547cae39e..5d9046ac905 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -804,8 +804,9 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
 	
 	gGL.setColorMask(false, true);
 	gGL.setSceneBlendType(LLRender::BT_REPLACE);
+	
 	// (Optionally) replace alpha with a single component image from a tga file.
-	if (!info->mStaticAlphaFileName.empty() && mMaskLayerList.empty())
+	if (!info->mStaticAlphaFileName.empty())
 	{
 		LLGLSNoAlphaTest gls_no_alpha_test;
 		gGL.flush();
-- 
GitLab