Don't mask HUD attachments also in non-deferred mode or they will be affected by daylight; Fix from Henri Beauchamp

Ansariel 2011-11-08 00:11:24 +01:00
parent af2e6e3c9c
commit 3c8d6bfe0d
1 changed files with 7 additions and 5 deletions

View File

@ -1025,14 +1025,16 @@ bool LLFace::canRenderAsMask()
const LLTextureEntry* te = getTextureEntry();
if ((te->getColor().mV[3] == 1.0f) && // can't treat as mask if we have face alpha
(te->getGlow() == 0.f) && // glowing masks are hard to implement - don't mask
getTexture()->getIsAlphaMask()) // texture actually qualifies for masking (lazily recalculated but expensive)
if ((te->getColor().mV[3] == 1.0f) && // can't treat as mask if we have face alpha
(te->getGlow() == 0.f) && // glowing masks are hard to implement - don't mask
!getViewerObject()->isHUDAttachment() && // Fix from CoolVL: hud attachments are NOT maskable (else they would get affected by day light)
getTexture()->getIsAlphaMask()) // texture actually qualifies for masking (lazily recalculated but expensive)
{
if (LLPipeline::sRenderDeferred)
{
if (getViewerObject()->isHUDAttachment() || te->getFullbright())
{ //hud attachments and fullbright objects are NOT subject to the deferred rendering pipe
// Fix from CoolVL: hud attachments are NOT maskable at all - see above
if (/*!getViewerObject()->isHUDAttachment() &&*/ te->getFullbright())
{ //fullbright objects are NOT subject to the deferred rendering pipe
return LLPipeline::sAutoMaskAlphaNonDeferred;
}
else