diff options
author | Dave Parks <davep@lindenlab.com> | 2013-06-10 13:00:47 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-06-10 13:00:47 -0500 |
commit | 0073884f837d1049499f85007e3cc5a3e4beafe0 (patch) | |
tree | 480c38cda82dc076b272c72428c249a52f513bed /indra/newview | |
parent | aaf42d473eb9eca9169e0800a7e7b6411db02cb2 (diff) |
NORSPEC-247 Fix for rigged attachments with alpha masking on occluding alpha object when 100% transparent.
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llvovolume.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 677d79d601..f24ee435c0 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4548,6 +4548,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) if (mat && LLPipeline::sRenderDeferred) { U8 alpha_mode = mat->getDiffuseAlphaMode(); + bool is_alpha = type == LLDrawPool::POOL_ALPHA && (alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND || te->getColor().mV[3] < 0.999f); @@ -4556,8 +4557,12 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) { //this face needs alpha blending, override alpha mode alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_BLEND; } - U32 mask = mat->getShaderMask(alpha_mode); - pool->addRiggedFace(facep, mask); + + if (!is_alpha || te->getColor().mV[3] > 0.f) // //only add the face if it will actually be visible + { + U32 mask = mat->getShaderMask(alpha_mode); + pool->addRiggedFace(facep, mask); + } } else if (mat) { @@ -4573,7 +4578,10 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) } else if (is_alpha || (te->getColor().mV[3] < 0.999f)) { - pool->addRiggedFace(facep, fullbright ? LLDrawPoolAvatar::RIGGED_FULLBRIGHT_ALPHA : LLDrawPoolAvatar::RIGGED_ALPHA); + if (te->getColor().mV[3] > 0.f) + { + pool->addRiggedFace(facep, fullbright ? LLDrawPoolAvatar::RIGGED_FULLBRIGHT_ALPHA : LLDrawPoolAvatar::RIGGED_ALPHA); + } } else if (gPipeline.canUseVertexShaders() && LLPipeline::sRenderBump |