diff options
author | Dave Parks <davep@lindenlab.com> | 2010-04-14 16:18:13 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-04-14 16:18:13 -0500 |
commit | 91d4289bd868a58a989539a43cfae69261a4fe47 (patch) | |
tree | d2b9efb2d6cfdb524397e04afec1aa020eedfa18 | |
parent | 11ab373c5d4ea5476330f0140f60bec0280d3e84 (diff) |
Hack to fix ATI depth shadows screwing up alpha masking.
(transplanted from 730a62c9a717c9aeb730e01632f259601acc1ece)
-rw-r--r-- | indra/newview/lldrawpoolavatar.cpp | 2 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index c1a57305b9..ac02d62a9e 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 8508b20689..a45f41a7dd 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -570,9 +570,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); } @@ -581,11 +584,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); |