summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2013-02-14 12:16:37 -0600
committerDave Parks <davep@lindenlab.com>2013-02-14 12:16:37 -0600
commitcc260a635674c56d8fab88a5cd4dd188b4c9ac9c (patch)
treeb9188e73b1aed56fbda8f8cdd73d64488d8e7c68 /indra/newview/app_settings/shaders
parent3fa68c78f8f3a190fffeadd7a181cff16fbc96b0 (diff)
parentbc60d34f68948542d863229617c22ba0ae6a186a (diff)
Automated merge with https://bitbucket.org/lindenlab/viewer-cat
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl26
1 files changed, 16 insertions, 10 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..ff30560adc 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
@@ -30,18 +30,24 @@ uniform mat4 matrixPalette[64];
mat4 getObjectSkinnedTransform()
{
- int i;
- vec4 w = fract(weight4);
- vec4 index = floor(weight4);
-
- float scale = 1.0/(w.x+w.y+w.z+w.w);
- w *= scale;
+ float w0 = fract(weight4.x);
+ float w1 = fract(weight4.y);
+ float w2 = fract(weight4.z);
+ float w3 = fract(weight4.w);
+
+ int i0 = int(floor(weight4.x));
+ int i1 = int(floor(weight4.y));
+ int i2 = int(floor(weight4.z));
+ int i3 = int(floor(weight4.w));
+
+ //float scale = 1.0/(w.x+w.y+w.z+w.w);
+ //w *= scale;
- mat4 mat = matrixPalette[int(index.x)]*w.x;
- mat += matrixPalette[int(index.y)]*w.y;
- mat += matrixPalette[int(index.z)]*w.z;
- mat += matrixPalette[int(index.w)]*w.w;
+ mat4 mat = matrixPalette[i0]*w0;
+ mat += matrixPalette[i1]*w1;
+ mat += matrixPalette[i2]*w2;
+ mat += matrixPalette[i3]*w3;
return mat;
}