diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 588a77a6204b80adfa6bc687c96811a40f534747..2cd9fef9f517402433c57cf4851eb944a0bc26ce 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -254,7 +254,6 @@ S32 LLDrawPoolAvatar::getNumShadowPasses()
 void LLDrawPoolAvatar::beginShadowPass(S32 pass)
 {
 	LLFastTimer t(FTM_SHADOW_AVATAR);
-	sSkipTransparent = TRUE;
 	sVertexProgram = &gDeferredAvatarShadowProgram;
 	if (sShaderLevel > 0)
 	{
@@ -276,7 +275,6 @@ void LLDrawPoolAvatar::beginShadowPass(S32 pass)
 void LLDrawPoolAvatar::endShadowPass(S32 pass)
 {
 	LLFastTimer t(FTM_SHADOW_AVATAR);
-	sSkipTransparent = FALSE;
 	if (sShaderLevel > 0)
 	{
 		sRenderingSkinned = FALSE;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index bd210b337614e52176e43334e5d4c2a425a1ec4c..02dc013ca4e20c14e5db101ebacf41150b6459b2 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -572,9 +572,12 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
 
 		F32 scale = gSavedSettings.getF32("RenderShadowResolutionScale");
 
+		//HACK: make alpha masking work on ATI depth shadows (work around for ATI driver bug)
+		U32 shadow_fmt = gGLManager.mIsATI ? GL_ALPHA : 0;
+
 		for (U32 i = 0; i < 4; i++)
 		{
-			mShadow[i].allocate(U32(resX*scale),U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE);
+			mShadow[i].allocate(U32(resX*scale),U32(resY*scale), shadow_fmt, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE);
 		}
 
 
@@ -583,11 +586,9 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
 
 		for (U32 i = 4; i < 6; i++)
 		{
-			mShadow[i].allocate(width, height, 0, TRUE, FALSE);
+			mShadow[i].allocate(width, height, shadow_fmt, TRUE, FALSE);
 		}
 
-
-
 		width = nhpo2(resX)/2;
 		height = nhpo2(resY)/2;
 		mLuminanceMap.allocate(width,height, GL_RGBA, FALSE, FALSE);