summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolavatar.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-10-07 17:44:57 -0500
committerDave Parks <davep@lindenlab.com>2011-10-07 17:44:57 -0500
commitcffcb414f57bcdc7de862d791f8f9c1fea91a7fb (patch)
treef47d74e1da86e550ac4b6dd9e5dfa59c4099f4a3 /indra/newview/lldrawpoolavatar.cpp
parent9cf4a4322b75a4d8fdc618c8f1edbf945c2f25b3 (diff)
SH-2488 Fix for shiny and alpha not interacting well on rigged attachments (and fix for assertion when rendering model import preview)
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rw-r--r--indra/newview/lldrawpoolavatar.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index d9b0b195f5..a710bdcdbd 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1275,10 +1275,9 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
U32 data_mask = face->getRiggedVertexBufferDataMask();
- S32 num_verts = (vol_face.mNumVertices + 0xF) & ~0xF;
if (buffer.isNull() ||
buffer->getTypeMask() != data_mask ||
- buffer->getRequestedVerts() != num_verts ||
+ buffer->getRequestedVerts() != vol_face.mNumVertices ||
buffer->getRequestedIndices() != vol_face.mNumIndices ||
(drawable && drawable->isState(LLDrawable::REBUILD_ALL)))
{
@@ -1318,6 +1317,16 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
LLMatrix3 mat_normal(mat3);
+ //let getGeometryVolume know if alpha should override shiny
+ if (face->getFaceColor().mV[3] < 1.f)
+ {
+ face->setPoolType(LLDrawPool::POOL_ALPHA);
+ }
+ else
+ {
+ face->setPoolType(LLDrawPool::POOL_AVATAR);
+ }
+
face->getGeometryVolume(*volume, face->getTEOffset(), mat_vert, mat_normal, offset, true);
buffer->flush();