summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/avatar
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-09-14 16:57:42 -0500
committerDave Parks <davep@lindenlab.com>2011-09-14 16:57:42 -0500
commit4e006b0e3891d5728a6753059f2c5afc77737482 (patch)
tree96af37ac252d823f8dc51e20546848ad464e0274 /indra/newview/app_settings/shaders/class2/avatar
parent758b936deaa0e6ea397c49afa5024315415eeb93 (diff)
parentc0ca2c62fd6b9a90542907ce46bf1fe0ab379e13 (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 f9f376c2b7..c0065f0bbe 100644
--- a/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl
+++ b/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl
@@ -24,6 +24,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);
@@ -31,17 +35,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;