summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2015-08-26 10:49:02 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2015-08-26 10:49:02 -0400
commit2ea8df0593d520b86bcf958263622218f76ac113 (patch)
treee122d46164a5df229c7b52f9290b584b4e35b983 /indra/newview/app_settings/shaders
parent0f9700af5b18b2ddd1eed10b34c4ad5d9a09ee7e (diff)
SL-205 WIP - support for 152-joint rigged meshes with both hardware and software skinning.
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rwxr-xr-xindra/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 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
}