summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl13
-rwxr-xr-xindra/newview/lldrawpoolavatar.cpp3
-rwxr-xr-xindra/newview/llvovolume.cpp1
3 files changed, 11 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
index 6cd38d8ef5..d3eed775bf 100755
--- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
@@ -24,8 +24,11 @@
ATTRIBUTE vec4 weight4;
-uniform mat3 matrixPalette[52];
-uniform vec3 translationPalette[52];
+/* BENTO JOINT COUNT LIMITS
+ * Note that the value in these two lines also needs to be updated to value-1 several places below.
+ */
+uniform mat3 matrixPalette[152];
+uniform vec3 translationPalette[152];
mat4 getObjectSkinnedTransform()
{
@@ -34,7 +37,7 @@ mat4 getObjectSkinnedTransform()
vec4 w = fract(weight4);
vec4 index = floor(weight4);
- index = min(index, vec4(51.0));
+ index = min(index, vec4(151.0));
index = max(index, vec4( 0.0));
float scale = 1.0/(w.x+w.y+w.z+w.w);
@@ -68,8 +71,8 @@ mat4 getObjectSkinnedTransform()
// If it's AMD make sure the GLSL compiler sees the arrays referenced once by static index. Otherwise it seems to optimise the storage awawy which leads to unfun crashes and artifacts.
mat3 dummy1 = matrixPalette[0];
vec3 dummy2 = translationPalette[0];
- mat3 dummy3 = matrixPalette[51];
- vec3 dummy4 = translationPalette[51];
+ mat3 dummy3 = matrixPalette[151];
+ vec3 dummy4 = translationPalette[151];
#endif
}
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index f828b56f7f..6c9107cb76 100755
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -55,7 +55,8 @@ static U32 sDataMask = LLDrawPoolAvatar::VERTEX_DATA_MASK;
static U32 sBufferUsage = GL_STREAM_DRAW_ARB;
static U32 sShaderLevel = 0;
-#define JOINT_COUNT 52
+// BENTO JOINT COUNT LIMIT
+#define JOINT_COUNT 152
LLGLSLShader* LLDrawPoolAvatar::sVertexProgram = NULL;
BOOL LLDrawPoolAvatar::sSkipOpaque = FALSE;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 267061b83d..7bbaf981ae 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4163,6 +4163,7 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
}
//build matrix palette
+ // BENTO JOINT COUNT LIMIT
static const size_t kMaxJoints = 64;
LLMatrix4a mp[kMaxJoints];