summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl23
1 files changed, 15 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl b/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl
index e25d84a594..78b5328c9a 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl
@@ -22,22 +22,29 @@
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
mat4 getSkinnedTransform();
void main()
{
vec4 pos;
-
+ vec4 pos_in = vec4(position, 1.0);
mat4 trans = getSkinnedTransform();
- pos.x = dot(trans[0], gl_Vertex);
- pos.y = dot(trans[1], gl_Vertex);
- pos.z = dot(trans[2], gl_Vertex);
+ pos.x = dot(trans[0], pos_in);
+ pos.y = dot(trans[1], pos_in);
+ pos.z = dot(trans[2], pos_in);
pos.w = 1.0;
- gl_FrontColor = gl_Color;
- gl_TexCoord[0] = gl_MultiTexCoord0;
- gl_Position = gl_ProjectionMatrix * pos;
+ vertex_color = diffuse_color;
+ vary_texcoord0 = texcoord0;
+ gl_Position = projection_matrix * pos;
}