diff options
| author | Richard Nelson <none@none> | 2010-07-20 11:31:23 -0700 |
|---|---|---|
| committer | Richard Nelson <none@none> | 2010-07-20 11:31:23 -0700 |
| commit | 572e72d8a1cb777b0d60cdfa389f3e397a652da9 (patch) | |
| tree | c9e7f05654525d3a5ed2d89267462f92b5e8fd6f /indra/newview/llface.cpp | |
| parent | 4bd450737bf1f5a74a4857932235d7bcbead1388 (diff) | |
| parent | 67fb58847981f69cb31c34d7141165ba3f49aef6 (diff) | |
merge
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 f299518474..cfe8b4c9a4 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -862,6 +862,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, |
