summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-04-14 16:18:13 -0500
committerDave Parks <davep@lindenlab.com>2010-04-14 16:18:13 -0500
commitd3d180f5db0350d6a8b930227b17d5001e673295 (patch)
tree072f744d13196509494d8c62c7c655ffcd87eeb8
parenta7e1745bed2e8c22843b946700b4ae9c8fbf8ac9 (diff)
Hack to fix ATI depth shadows screwing up alpha masking.
-rw-r--r--indra/newview/lldrawpoolavatar.cpp2
-rw-r--r--indra/newview/pipeline.cpp9
2 files changed, 5 insertions, 6 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 588a77a620..2cd9fef9f5 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 bd210b3376..02dc013ca4 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);