diff options
author | Dave Parks <davep@lindenlab.com> | 2011-04-28 16:40:06 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-04-28 16:40:06 -0500 |
commit | b98a17c8255881ce0bf48b213ea6be8887363e1e (patch) | |
tree | ed4d7f3d7e4607c6f9cf05bee6397d0406971381 /indra/newview/llface.cpp | |
parent | deba003d101fc96802e87e10ef553d24dd40a615 (diff) |
SH-1443 Fix for fullbright alpha objects not appearing for some combinations of deferred rendering and non deferred automatic alpha mask toggling.
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r-- | indra/newview/llface.cpp | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index ae455a8287..5398c13c44 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -979,19 +979,29 @@ bool LLFace::canRenderAsMask() } const LLTextureEntry* te = getTextureEntry(); - return ( - ( - (LLPipeline::sRenderDeferred && LLPipeline::sAutoMaskAlphaDeferred) || - - (!LLPipeline::sRenderDeferred && LLPipeline::sAutoMaskAlphaNonDeferred) - ) // do we want masks at all? - && - (te->getColor().mV[3] == 1.0f) && // can't treat as mask if we have face alpha - !(LLPipeline::sRenderDeferred && te->getFullbright()) && // hack: alpha masking renders fullbright faces invisible in deferred rendering mode, need to figure out why - for now, avoid + + 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 (LLPipeline::sRenderDeferred) + { + if (getViewerObject()->isHUDAttachment() || te->getFullbright()) + { //hud attachments and fullbright objects are NOT subject to the deferred rendering pipe + return LLPipeline::sAutoMaskAlphaNonDeferred; + } + else + { + return LLPipeline::sAutoMaskAlphaDeferred; + } + } + else + { + return LLPipeline::sAutoMaskAlphaNonDeferred; + } + } - getTexture()->getIsAlphaMask() // texture actually qualifies for masking (lazily recalculated but expensive) - ); + return false; } |