diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-03-09 13:45:53 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-03-09 13:45:53 +0000 |
commit | b64b0c1b777419d210d16a378b6957de65dc3932 (patch) | |
tree | 39553f074eb4d96e9a4051c9f79ad2d46bd67ef6 | |
parent | 4f4fc07eb12066dcb65a3c2274160ffa0bfd52ef (diff) |
We can enable alpha masking for fullbright faces as long as we're not in deferred mode. Deferred masked fullbrights are still broken (we fall back to blending instead of masking as a workaround), but they always have been. :/
-rw-r--r-- | indra/newview/llvovolume.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index ea493d4798..49c0c4d4e0 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3299,11 +3299,15 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt"); bool LLVolumeGeometryManager::canRenderAsMask(LLFace* facep) { const LLTextureEntry* te = facep->getTextureEntry(); - return (LLPipeline::sFastAlpha && - (te->getColor().mV[3] == 1.0f) && - (!te->getFullbright()) && // hack: alpha masking renders fullbright faces invisible, need to figure out why - for now, avoid + return ( + LLPipeline::sFastAlpha && // 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 - facep->getTexture()->getIsAlphaMask()); + + facep->getTexture()->getIsAlphaMask() // texture actually qualifies for masking (lazily calculated but expensive) + ); } void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) |