summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/avatar/eyeballV.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/avatar/eyeballV.glsl
parent333608e889827342c79d3eee2006b1a704985740 (diff)
SH-2242 Work in progress migrating to glVertexAttrib everywhere
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl15
1 files changed, 10 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl b/indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl
index 2eb814bd91..0b075feef5 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl
@@ -6,6 +6,10 @@
*/
+attribute vec3 position;
+attribute vec4 diffuse_color;
+attribute vec3 normal;
+attribute vec2 texcoord0;
vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
@@ -13,16 +17,17 @@ void calcAtmospherics(vec3 inPositionEye);
void main()
{
//transform vertex
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ vec3 pos = (gl_ModelViewMatrix * vec4(position.xyz, 1.0)).xyz;
+ gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0);
+ gl_TexCoord[0] = gl_TextureMatrix[0] * vec4(texcoord0,0,1);
- vec3 pos = (gl_ModelViewMatrix * gl_Vertex).xyz;
- vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+
+ vec3 norm = normalize(gl_NormalMatrix * normal);
calcAtmospherics(pos.xyz);
vec4 specular = vec4(1.0);
- vec4 color = calcLightingSpecular(pos, norm, gl_Color, specular, vec4(0.0));
+ vec4 color = calcLightingSpecular(pos, norm, diffuse_color, specular, vec4(0.0));
gl_FrontColor = color;
}