diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl index 36b00dfbc1..a9b086e215 100644 --- a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl @@ -22,8 +22,17 @@ * 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; + +attribute vec3 position; +attribute vec4 diffuse_color; +attribute vec3 normal; +attribute vec2 texcoord0; void calcAtmospherics(vec3 inPositionEye); @@ -32,18 +41,18 @@ uniform vec4 origin; void main() { //transform vertex - gl_Position = ftransform(); + gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); - vec4 pos = (gl_ModelViewMatrix * gl_Vertex); - 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); + vec4 pos = (modelview_matrix * vec4(position.xyz, 1.0)); calcAtmospherics(pos.xyz); - gl_FrontColor = gl_Color; + gl_FrontColor = diffuse_color; gl_FogFragCoord = pos.z; } |