diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2011-05-17 12:13:54 -0400 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2011-05-17 12:13:54 -0400 |
commit | 8f94ff85f9b0318f959f066a138eac03770838cf (patch) | |
tree | 7b2885af863ae16281f197c61bbedff4f2895e2c /indra/newview/llface.cpp | |
parent | 2deea74cf6f08376e14e2f7e5333fc6959d2af19 (diff) | |
parent | a2d8f0cb3308fed1cb2c8d5fa8fb74ec4cefa45b (diff) |
merging up latest mesh-development to nyx-mesh-development
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; } |