summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/avatar
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-08-11 14:20:57 -0500
committerDave Parks <davep@lindenlab.com>2011-08-11 14:20:57 -0500
commit80398b3ccb0c4a6ff3ac20b3565619fe5cecc2f9 (patch)
tree623156a93d159ece460a31590701d7cbdc701cdc /indra/newview/app_settings/shaders/class2/avatar
parent610764fbfce75f54c95d4b10c2a8f9482a7a7b80 (diff)
parent2dd8ce53e4e0d14f2bc20796eb6bdf1ef12a65df (diff)
merge
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/avatar')
-rw-r--r--indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl16
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl b/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl
index 3e8b719f93..e6d5c00c4d 100644
--- a/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl
+++ b/indra/newview/app_settings/shaders/class2/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,17 +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 * gl_Vertex).xyz;
- vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+ 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 norm = normalize(gl_NormalMatrix * normal);
calcAtmospherics(pos.xyz);
// vec4 specular = specularColor;
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;
gl_FogFragCoord = pos.z;