diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl index 819b28e4fd..b9eff87a13 100644 --- a/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl +++ b/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl @@ -22,7 +22,12 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ - + +uniform mat3 normal_matrix; +uniform mat4 texture_matrix0; +uniform mat4 texture_matrix1; +uniform mat4 modelview_matrix; +uniform mat4 modelview_projection_matrix; void calcAtmospherics(vec3 inPositionEye); @@ -31,23 +36,28 @@ uniform vec4 origin; varying float vary_texture_index; +attribute vec4 position; +attribute vec3 normal; +attribute vec4 diffuse_color; +attribute vec2 texcoord0; + void main() { //transform vertex - vec4 vert = vec4(gl_Vertex.xyz,1.0); - vary_texture_index = gl_Vertex.w; - gl_Position = gl_ModelViewProjectionMatrix*vert; + vec4 vert = vec4(position.xyz,1.0); + vary_texture_index = position.w; + vec4 pos = (modelview_matrix * vert); + gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); - vec4 pos = (gl_ModelViewMatrix * vert); - vec3 norm = normalize(gl_NormalMatrix * gl_Normal); + vec3 norm = normalize(normal_matrix * normal); vec3 ref = reflect(pos.xyz, -norm); - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - gl_TexCoord[1] = gl_TextureMatrix[1]*vec4(ref,1.0); + gl_TexCoord[0] = texture_matrix0 * vec4(texcoord0,0,1); + gl_TexCoord[1] = texture_matrix1*vec4(ref,1.0); calcAtmospherics(pos.xyz); - gl_FrontColor = gl_Color; + gl_FrontColor = diffuse_color; gl_FogFragCoord = pos.z; } |