summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-03-09 13:45:53 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-03-09 13:45:53 +0000
commit6b08cc3a2da882982f80be477c159c2d2e4d89d0 (patch)
tree46b1622dab65cfce69bd2112f94781f5ab5a2c3a /indra
parent43c425db2467fa91d2df40b5dd708a738003131e (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. :/
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvovolume.cpp12
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)