diff options
author | Dave Parks <davep@lindenlab.com> | 2013-05-10 16:08:48 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-05-10 16:08:48 -0500 |
commit | efe8d75fe31ada16d00d0b5545071d2adbab54ad (patch) | |
tree | f9d0589fd62527d00cf488c8ad24fd1eaf0fcea7 | |
parent | d2f71df15f14fe0f7e17f962d39d19dd571fc530 (diff) |
NORSPEC-173 Shrink size of matrix palette for backwards compatibility.
-rw-r--r-- | indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl | 2 | ||||
-rw-r--r-- | indra/newview/lldrawpoolavatar.cpp | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl index 2745d5fd95..43ed41a205 100644 --- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl +++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl @@ -26,7 +26,7 @@ ATTRIBUTE vec4 weight4; -uniform mat4 matrixPalette[64]; +uniform mat4 matrixPalette[32]; mat4 getObjectSkinnedTransform() { diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 69f10cd4df..c7ffef18db 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1587,9 +1587,11 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) { if (sShaderLevel > 0) { //upload matrix palette to shader - LLMatrix4 mat[64]; + LLMatrix4 mat[32]; - for (U32 i = 0; i < skin->mJointNames.size(); ++i) + U32 count = llmin(skin->mJointNames.size(), (U32) 32); + + for (U32 i = 0; i < count; ++i) { LLJoint* joint = avatar->getJoint(skin->mJointNames[i]); if (joint) @@ -1602,7 +1604,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) stop_glerror(); LLDrawPoolAvatar::sVertexProgram->uniformMatrix4fv("matrixPalette", - skin->mJointNames.size(), + count, FALSE, (GLfloat*) mat[0].mMatrix); |