summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-09-16 12:40:53 -0500
committerDave Parks <davep@lindenlab.com>2011-09-16 12:40:53 -0500
commitda84f5552731e1ece3a463c4c385bb327f1048a1 (patch)
treedc10fc228a15b69f8b62631a68dbc67efe1f3395 /indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
parent4fea7dcb3ef35cae9e31ba467403d31ce9083905 (diff)
SH-2243 work in progress -- don't use deprecated shader state
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl19
1 files changed, 11 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index 839606cdcb..4fffb9e97f 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -27,6 +27,9 @@
#extension GL_ARB_texture_rectangle : enable
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
uniform sampler2DRectShadow shadowMap0;
uniform sampler2DRectShadow shadowMap1;
uniform sampler2DRectShadow shadowMap2;
@@ -41,11 +44,11 @@ uniform vec2 shadow_res;
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
-varying vec3 vary_ambient;
-varying vec3 vary_directional;
-varying vec3 vary_fragcoord;
-varying vec3 vary_position;
-varying vec3 vary_pointlight_col;
+VARYING vec3 vary_ambient;
+VARYING vec3 vary_directional;
+VARYING vec3 vary_fragcoord;
+VARYING vec3 vary_position;
+VARYING vec3 vary_pointlight_col;
uniform float shadow_bias;
@@ -122,9 +125,9 @@ void main()
}
}
- vec4 diff = diffuseLookup(gl_TexCoord[0].xy);
+ vec4 diff = diffuseLookup(vary_texcoord0.xy);
- vec4 col = vec4(vary_ambient + vary_directional.rgb*shadow, gl_Color.a);
+ vec4 col = vec4(vary_ambient + vary_directional.rgb*shadow, vertex_color.a);
vec4 color = diff * col;
color.rgb = atmosLighting(color.rgb);
@@ -133,7 +136,7 @@ void main()
color.rgb += diff.rgb * vary_pointlight_col.rgb;
- //gl_FragColor = gl_Color;
+ //gl_FragColor = vertex_color;
gl_FragColor = color;
//gl_FragColor.r = 0.0;
//gl_FragColor = vec4(1,shadow,1,1);