summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-05-21 08:15:28 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-05-21 08:15:28 -0400
commitf47ceb47bbcfd3466813d1653992e1ea418964b5 (patch)
treef3b1c26e835c8ddf40587783095a8b8954717d7b /indra/newview/app_settings/shaders/class1
parentc2ef3b4c7186dbbd95b16520f281b7d58364fb52 (diff)
parenta46fdc10c76ebbf76b4976f0cbb36b649fe4fdd2 (diff)
merged jelly-doll viewer-release into bento
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
index 3060307b21..8f754fe82b 100644
--- 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[MAX_JOINTS_PER_MESH_OBJECT];
+uniform vec3 translationPalette[MAX_JOINTS_PER_MESH_OBJECT];
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(MAX_JOINTS_PER_MESH_OBJECT-1));
index = max(index, vec4( 0.0));
w *= 1.0/(w.x+w.y+w.z+w.w);
@@ -67,8 +70,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[MAX_JOINTS_PER_MESH_OBJECT-1];
+ vec3 dummy4 = translationPalette[MAX_JOINTS_PER_MESH_OBJECT-1];
#endif
}