summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-08-08 15:29:23 -0500
committerDave Parks <davep@lindenlab.com>2011-08-08 15:29:23 -0500
commit14f6bbadef2c39e58a3b54c0c6212949acf50e45 (patch)
tree295c3bd149b343cd334885133f101963219d7f39 /indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
parent333608e889827342c79d3eee2006b1a704985740 (diff)
SH-2242 Work in progress migrating to glVertexAttrib everywhere
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl14
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
index b56d1493c3..e424737702 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
@@ -6,6 +6,10 @@
*/
+attribute vec4 position;
+attribute vec4 diffuse_color;
+attribute vec3 normal;
+attribute vec2 texcoord0;
varying vec3 vary_normal;
varying float vary_texture_index;
@@ -13,11 +17,11 @@ varying float vary_texture_index;
void main()
{
//transform vertex
- gl_Position = gl_ModelViewProjectionMatrix * vec4(gl_Vertex.xyz, 1.0);
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0);
+ gl_TexCoord[0] = gl_TextureMatrix[0] * vec4(texcoord0,0,1);
- vary_texture_index = gl_Vertex.w;
- vary_normal = normalize(gl_NormalMatrix * gl_Normal);
+ vary_texture_index = position.w;
+ vary_normal = normalize(gl_NormalMatrix * normal);
- gl_FrontColor = gl_Color;
+ gl_FrontColor = diffuse_color;
}