diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-26 14:42:06 +0100 |
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-26 14:42:06 +0100 |
| commit | 64112134be2a4b46c7ade1483e3d968ea1e3e81f (patch) | |
| tree | 496b31e2bb9ba99ea7b568ca24ea24a80bda6880 /indra/newview/llface.cpp | |
| parent | 438f0e372ee8a1d41d535314e4061f20f6c66c88 (diff) | |
EXT-7060 default auto alpha masking to ON for deferred rendering (only deferred rendering)
Diffstat (limited to 'indra/newview/llface.cpp')
| -rw-r--r-- | indra/newview/llface.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index bc3e04db18..7816418dc2 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -883,6 +883,26 @@ void LLFace::updateRebuildFlags() } } + +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 + (te->getGlow() == 0.f) && // glowing masks are hard to implement - don't mask + + getTexture()->getIsAlphaMask() // texture actually qualifies for masking (lazily recalculated but expensive) + ); +} + + static LLFastTimer::DeclareTimer FTM_FACE_GET_GEOM("Face Geom"); BOOL LLFace::getGeometryVolume(const LLVolume& volume, |
