diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-11-08 15:28:13 -0600 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-11-08 15:28:13 -0600 |
| commit | 0d568ce9f0522eaa21a12fa5fae31f80c59bd947 (patch) | |
| tree | 6b849a3b48a35feaeff0278ca8e562359df852e2 /indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl | |
| parent | 28c26cb491305525fb3f24ec2ef3bcb9b1ab8c5f (diff) | |
| parent | ef8bdb5d95ebd869279ee4bb0510d54e51ab747f (diff) | |
merge
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl')
| -rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl | 27 |
1 files changed, 14 insertions, 13 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..8d88e93698 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl @@ -22,11 +22,16 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ - - #extension GL_ARB_texture_rectangle : enable +#ifdef DEFINE_GL_FRAGCOLOR +out vec4 gl_FragColor; +#endif + +VARYING vec4 vertex_color; +VARYING vec2 vary_texcoord0; + uniform sampler2DRectShadow shadowMap0; uniform sampler2DRectShadow shadowMap1; uniform sampler2DRectShadow shadowMap2; @@ -41,11 +46,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 +127,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,10 +138,6 @@ void main() color.rgb += diff.rgb * vary_pointlight_col.rgb; - //gl_FragColor = gl_Color; gl_FragColor = color; - //gl_FragColor.r = 0.0; - //gl_FragColor = vec4(1,shadow,1,1); - } |
