summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2014-01-23 17:55:03 -0600
committerDave Parks <davep@lindenlab.com>2014-01-23 17:55:03 -0600
commit476e317c8b4803926e1775ec206d013bd717ad98 (patch)
tree489ed06858091ccf67cbac64d90a9f6fef3d6501 /indra
parentf1bb5c5ada375a4e72120c93f0595aacca7fefa7 (diff)
FITMESH-6, FITMESH-20 Fix for some objects disappearing when hardware skinning enabled and ALM disabled.
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl9
-rwxr-xr-xindra/newview/lldrawpoolavatar.cpp12
2 files changed, 10 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
index 972d10b325..8eb5a977bc 100755
--- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
@@ -22,17 +22,14 @@
* $/LicenseInfo$
*/
-
-
ATTRIBUTE vec4 weight4;
-uniform mat3 matrixPalette[64];
-uniform vec3 translationPalette[64];
-
+uniform mat3 matrixPalette[52];
+uniform vec3 translationPalette[52];
mat4 getObjectSkinnedTransform()
{
- int i;
+ int i;
vec4 w = fract(weight4);
vec4 index = floor(weight4);
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index e77ed27fa2..4578d3d0cd 100755
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -55,6 +55,7 @@ static U32 sDataMask = LLDrawPoolAvatar::VERTEX_DATA_MASK;
static U32 sBufferUsage = GL_STREAM_DRAW_ARB;
static U32 sShaderLevel = 0;
+#define JOINT_COUNT 52
LLGLSLShader* LLDrawPoolAvatar::sVertexProgram = NULL;
BOOL LLDrawPoolAvatar::sSkipOpaque = FALSE;
@@ -1582,7 +1583,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
LLVector4a* norm = has_normal ? (LLVector4a*) normal.get() : NULL;
//build matrix palette
- LLMatrix4a mp[64];
+ LLMatrix4a mp[JOINT_COUNT];
LLMatrix4* mat = (LLMatrix4*) mp;
for (U32 j = 0; j < skin->mJointNames.size(); ++j)
@@ -1642,6 +1643,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
LLVector4a& n = vol_face.mNormals[j];
bind_shape_matrix.rotate(n, t);
final_mat.rotate(t, dst);
+ dst.normalize3fast();
norm[j] = dst;
}
}
@@ -1708,9 +1710,9 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
{
if (sShaderLevel > 0)
{ //upload matrix palette to shader
- LLMatrix4 mat[64];
+ LLMatrix4 mat[JOINT_COUNT];
- U32 count = llmin((U32) skin->mJointNames.size(), (U32) 64);
+ U32 count = llmin((U32) skin->mJointNames.size(), (U32) JOINT_COUNT);
for (U32 i = 0; i < count; ++i)
{
@@ -1724,9 +1726,9 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
stop_glerror();
- F32 mp[64*9];
+ F32 mp[JOINT_COUNT*9];
- F32 transp[64*3];
+ F32 transp[JOINT_COUNT*3];
for (U32 i = 0; i < count; ++i)
{