summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-02-24 13:23:39 -0800
committerMerov Linden <merov@lindenlab.com>2014-02-24 13:23:39 -0800
commit245de340d72d0a836cc7525cf8143c232b00235b (patch)
tree1436dbf2dfac1deecee4a2ded9a891b7bf68bfb5 /indra/newview/app_settings/shaders/class1
parente6efb8f297fa21d76876f391f57d8abdd065584a (diff)
parentde8fea13627cc5978b8a6135802a52864a11c39a (diff)
Pull merge from viewer-release
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl36
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/alphaF.glsl1
2 files changed, 27 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 39632d0cef..57129c3bd1 100755
--- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
@@ -22,30 +22,46 @@
* $/LicenseInfo$
*/
-
-
ATTRIBUTE vec4 weight4;
-uniform mat4 matrixPalette[32];
+uniform mat3 matrixPalette[52];
+uniform vec3 translationPalette[52];
mat4 getObjectSkinnedTransform()
{
- int i;
+ int i;
vec4 w = fract(weight4);
vec4 index = floor(weight4);
- index = min(index, vec4(31.0));
+ index = min(index, vec4(51.0));
index = max(index, vec4( 0.0));
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;
+ int i1 = int(index.x);
+ int i2 = int(index.y);
+ int i3 = int(index.z);
+ int i4 = int(index.w);
- return mat;
+ mat3 mat = matrixPalette[i1]*w.x;
+ mat += matrixPalette[i2]*w.y;
+ mat += matrixPalette[i3]*w.z;
+ mat += matrixPalette[i4]*w.w;
+
+ vec3 trans = translationPalette[i1]*w.x;
+ trans += translationPalette[i2]*w.y;
+ trans += translationPalette[i3]*w.z;
+ trans += translationPalette[i4]*w.w;
+
+ mat4 ret;
+
+ ret[0] = vec4(mat[0], 0);
+ ret[1] = vec4(mat[1], 0);
+ ret[2] = vec4(mat[2], 0);
+ ret[3] = vec4(trans, 1.0);
+
+ return ret;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index e5f7366b70..2b5f001873 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -534,6 +534,7 @@ void main()
#ifdef FOR_IMPOSTOR
vec4 color;
color.rgb = diff.rgb;
+ color.a = 1.0;
#ifdef USE_VERTEX_COLOR
float final_alpha = diff.a * vertex_color.a;