diff options
author | Dave Parks <davep@lindenlab.com> | 2011-09-16 12:40:53 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-09-16 12:40:53 -0500 |
commit | da84f5552731e1ece3a463c4c385bb327f1048a1 (patch) | |
tree | dc10fc228a15b69f8b62631a68dbc67efe1f3395 /indra/newview/app_settings/shaders/class2/lighting/lightShinyNonIndexedF.glsl | |
parent | 4fea7dcb3ef35cae9e31ba467403d31ce9083905 (diff) |
SH-2243 work in progress -- don't use deprecated shader state
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/lighting/lightShinyNonIndexedF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/lighting/lightShinyNonIndexedF.glsl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightShinyNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightShinyNonIndexedF.glsl index 3b30ebf6f1..477408f5af 100644 --- a/indra/newview/app_settings/shaders/class2/lighting/lightShinyNonIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class2/lighting/lightShinyNonIndexedF.glsl @@ -23,8 +23,9 @@ * $/LicenseInfo$ */ - - +VARYING vec4 vertex_color; +VARYING vec2 vary_texcoord0; +VARYING vec3 vary_texcoord1; uniform samplerCube environmentMap; uniform sampler2D diffuseMap; @@ -35,16 +36,16 @@ vec4 applyWaterFog(vec4 color); void shiny_lighting() { - vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy); - color.rgb *= gl_Color.rgb; + vec4 color = texture2D(diffuseMap,vary_texcoord0.xy); + color.rgb *= vertex_color.rgb; - vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb; - color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a); + vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb; + color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a); color.rgb = atmosLighting(color.rgb); color.rgb = scaleSoftClip(color.rgb); - color.a = max(color.a, gl_Color.a); + color.a = max(color.a, vertex_color.a); gl_FragColor = color; } |