diff --git a/indra/newview/app_settings/shaders/class1/deferred/attachmentAlphaMaskShadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/attachmentAlphaMaskShadowF.glsl
index a08550d69c35d014ed38a80bd6504af20002c18c..c64b6ba24066ceb57544c9dcc585d860cd354a7d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/attachmentAlphaMaskShadowF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/attachmentAlphaMaskShadowF.glsl
@@ -41,7 +41,7 @@ VARYING vec4 vertex_color;
 
 void main() 
 {
-	float alpha = texture2D(diffuseMap, vary_texcoord0.xy).a * vertex_color.a;
+	float alpha = texture2D(diffuseMap, vary_texcoord0.xy).a;
 
 	if (alpha < 0.05) // treat as totally transparent
 	{
@@ -50,7 +50,7 @@ void main()
 
 	if (alpha < minimum_alpha) // treat as semi-transparent
 	{
-	  if (fract(0.5*floor(target_pos_x / pos_w )) < 0.25)
+	  //if (fract(0.5*floor(target_pos_x / pos_w )) < 0.25)
 	  {
 	    discard;
 	  }
diff --git a/indra/newview/app_settings/shaders/class1/deferred/highlightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/highlightF.glsl
index 1adeb9237cd094b1eeb0584e8f451d63a68a3dd9..90566393d281b4b97ffa0d194c3f8d18c643b397 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/highlightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/highlightF.glsl
@@ -36,7 +36,7 @@ VARYING vec2 vary_texcoord0;
 
 void main() 
 {
-	frag_data[0] = color*texture2D(diffuseMap, vary_texcoord0.xy));
+	frag_data[0] = color*texture2D(diffuseMap, vary_texcoord0.xy);
 	frag_data[1] = vec4(0.0);
 	frag_data[2] = vec4(0.0, 1.0, 0.0, 1.0);
 }
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index a9df63debd5908b3d19794dba5e3941e10dee524..a2308b252987ad5e025b91db3e62c73e630b0c46 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1807,6 +1807,9 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
         S32 offset = face->getIndicesStart();
 		U32 count = face->getIndicesCount();
 
+        U16 start = face->getGeomStart();
+		U16 end = start + face->getGeomCount()-1;			
+
 		LLDrawable* drawable = face->getDrawable();
 		if (!drawable)
 		{
@@ -1862,15 +1865,10 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
             LLViewerTexture* tex = face->getTexture(LLRender::DIFFUSE_MAP);
             if (tex)
             {
-                LLGLenum image_format = tex->getPrimaryFormat();
                 if (tex->getIsAlphaMask())
                 {
                     is_alpha_mask = true;
                 }
-                else if (!is_alpha_mask && (image_format == GL_RGBA || image_format == GL_ALPHA))
-                {
-                    is_alpha_blend = true;
-                }
             }
 
             if (mat)
@@ -1894,6 +1892,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
                     case LLMaterial::DIFFUSE_ALPHA_MODE_NONE:
                     default:
                         is_alpha_blend = false;
+                        is_alpha_mask  = false;
                         break;
                 }
             }
@@ -1906,6 +1905,15 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
                 }
             }
 
+            if (tex)
+            {
+                LLGLenum image_format = tex->getPrimaryFormat();
+                if (!is_alpha_mask && (image_format == GL_RGBA || image_format == GL_ALPHA))
+                {
+                    is_alpha_blend = true;
+                }
+            }
+
             // if this is alpha mask content and we're doing opaques or a non-alpha-mask shadow pass...
             if (is_alpha_mask && (LLDrawPoolAvatar::sSkipTransparent || LLDrawPoolAvatar::sShadowPass != SHADOW_PASS_ATTACHMENT_ALPHA_MASK))
             {
@@ -1972,9 +1980,6 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
 				data_mask &= ~LLVertexBuffer::MAP_WEIGHT4;
 			}
 
-			U16 start = face->getGeomStart();
-			U16 end = start + face->getGeomCount()-1;			
-
 			/*if (glow)
 			{
 				gGL.diffuseColor4f(0,0,0,face->getTextureEntry()->getGlow());