From 3c8d6bfe0d54894cd86ac61abb381c91bc3b9a3d Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 8 Nov 2011 00:11:24 +0100 Subject: [PATCH] Don't mask HUD attachments also in non-deferred mode or they will be affected by daylight; Fix from Henri Beauchamp --- indra/newview/llface.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 610ebcb787..f3eb750e24 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -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