summaryrefslogtreecommitdiff
path: root/indra/newview
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
commit8da956d60926cb9c62c15e6766ea542049690777 (patch)
tree2beb5227b4dbebd4a1776c7cc6a0f37197ae101f /indra/newview
parent4c022455685598bfd3ab90c4611e053fad72345d (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/newview')
-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 90a06a966d..1725879b7f 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3417,11 +3417,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)