summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolavatar.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2013-10-10 13:56:06 -0500
committerDave Parks <davep@lindenlab.com>2013-10-10 13:56:06 -0500
commitff8b002c3b2bc68bdf4b88c1687a711d2d7c0ca6 (patch)
tree32397148f0966e461bdab303e41b196f1382f5c4 /indra/newview/lldrawpoolavatar.cpp
parentea1e1b0925b386cf83178539b8eae9e25c573548 (diff)
Quite down log spam from loading shaders.
Up bone cap to 64 for rigged meshes.
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rwxr-xr-xindra/newview/lldrawpoolavatar.cpp40
1 files changed, 36 insertions, 4 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index f622d5a63a..e77ed27fa2 100755
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1708,9 +1708,9 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
{
if (sShaderLevel > 0)
{ //upload matrix palette to shader
- LLMatrix4 mat[32];
+ LLMatrix4 mat[64];
- U32 count = llmin((U32) skin->mJointNames.size(), (U32) 32);
+ U32 count = llmin((U32) skin->mJointNames.size(), (U32) 64);
for (U32 i = 0; i < count; ++i)
{
@@ -1724,10 +1724,42 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
stop_glerror();
- LLDrawPoolAvatar::sVertexProgram->uniformMatrix4fv(LLViewerShaderMgr::AVATAR_MATRIX,
+ F32 mp[64*9];
+
+ F32 transp[64*3];
+
+ for (U32 i = 0; i < count; ++i)
+ {
+ F32* m = (F32*) mat[i].mMatrix;
+
+ U32 idx = i*9;
+
+ mp[idx+0] = m[0];
+ mp[idx+1] = m[1];
+ mp[idx+2] = m[2];
+
+ mp[idx+3] = m[4];
+ mp[idx+4] = m[5];
+ mp[idx+5] = m[6];
+
+ mp[idx+6] = m[8];
+ mp[idx+7] = m[9];
+ mp[idx+8] = m[10];
+
+ idx = i*3;
+
+ transp[idx+0] = m[12];
+ transp[idx+1] = m[13];
+ transp[idx+2] = m[14];
+ }
+
+ LLDrawPoolAvatar::sVertexProgram->uniformMatrix3fv(LLViewerShaderMgr::AVATAR_MATRIX,
count,
FALSE,
- (GLfloat*) mat[0].mMatrix);
+ (GLfloat*) mp);
+
+ LLDrawPoolAvatar::sVertexProgram->uniform3fv(LLShaderMgr::AVATAR_TRANSLATION, count, transp);
+
stop_glerror();
}