summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-02-29 11:11:10 -0800
committerOz Linden <oz@lindenlab.com>2012-02-29 11:11:10 -0800
commit373ee3dd23dff931a4fb639dca183acb473a9d43 (patch)
tree183b47447d0f60dd133dff4e7361462c46061d3b /indra
parent1bbdf941a250bb7296e2ba4968f0fdfb8c6f4d75 (diff)
parent077130eaee30883cb9e666584b3362e2481bd6dd (diff)
merge changes for sh-2963
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lldrawpool.h1
-rw-r--r--indra/newview/lldrawpoolalpha.cpp1
-rw-r--r--indra/newview/llvovolume.cpp10
3 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h
index 5a2981e749..64774d06df 100644
--- a/indra/newview/lldrawpool.h
+++ b/indra/newview/lldrawpool.h
@@ -133,6 +133,7 @@ public:
PASS_ALPHA,
PASS_ALPHA_MASK,
PASS_FULLBRIGHT_ALPHA_MASK,
+ PASS_ALPHA_INVISIBLE,
NUM_RENDER_TYPES,
};
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index ddb7d3ceeb..5b62dbc560 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -337,6 +337,7 @@ void LLDrawPoolAlpha::render(S32 pass)
pushBatches(LLRenderPass::PASS_ALPHA_MASK, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, FALSE);
pushBatches(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, FALSE);
+ pushBatches(LLRenderPass::PASS_ALPHA_INVISIBLE, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, FALSE);
if(shaders)
{
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 7492a06784..03d4c51aff 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4433,10 +4433,10 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
else
{
if (te->getColor().mV[3] > 0.f)
- {
+ { //only treat as alpha in the pipeline if < 100% transparent
drawablep->setState(LLDrawable::HAS_ALPHA);
- alpha_faces.push_back(facep);
}
+ alpha_faces.push_back(facep);
}
}
else
@@ -4947,7 +4947,11 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
if (is_alpha)
{
// can we safely treat this as an alpha mask?
- if (facep->canRenderAsMask())
+ if (facep->getFaceColor().mV[3] <= 0.f)
+ { //100% transparent, don't render unless we're highlighting transparent
+ registerFace(group, facep, LLRenderPass::PASS_ALPHA_INVISIBLE);
+ }
+ else if (facep->canRenderAsMask())
{
if (te->getFullbright() || LLPipeline::sNoAlpha)
{