summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-09-15 00:55:11 -0500
committerDave Parks <davep@lindenlab.com>2011-09-15 00:55:11 -0500
commitf72a24bf3a5bf7ecb826ef5e6d7f17dbb92d5db2 (patch)
treea4a070ba8b95645089dcd55a848baec41b625cbc /indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
parent758b936deaa0e6ea397c49afa5024315415eeb93 (diff)
parent530981a2149a74e1dc003cea1bbc9dc392fcae60 (diff)
merge
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl19
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
index 7c5a4d35b3..e158df13f7 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
@@ -22,8 +22,15 @@
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_projection_matrix;
+
+attribute vec4 position;
+attribute vec4 diffuse_color;
+attribute vec3 normal;
+attribute vec2 texcoord0;
varying vec3 vary_normal;
varying float vary_texture_index;
@@ -31,11 +38,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 = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ gl_TexCoord[0] = texture_matrix0 * 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(normal_matrix * normal);
- gl_FrontColor = gl_Color;
+ gl_FrontColor = diffuse_color;
}