summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
diff options
context:
space:
mode:
authorDebi King (Dessie) <dessie@lindenlab.com>2011-05-24 11:57:35 -0400
committerDebi King (Dessie) <dessie@lindenlab.com>2011-05-24 11:57:35 -0400
commit00ad0c425398dd748f4759243dc789199a73e87d (patch)
tree801ab4805be44117bda3a6d35e18161cc3ccd1c5 /indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
parente677e5e77114cfbfcd7c5e838922fdf8d12853fb (diff)
parente5752934be74a84e6ec0ff8cb96974bd1e9060ec (diff)
merge up to latest viewer-development with mesh changes
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl16
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index e2d7cd94da..6dfc1b952c 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -4,6 +4,8 @@
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* $/LicenseInfo$
*/
+
+#version 120
#extension GL_ARB_texture_rectangle : enable
@@ -12,7 +14,6 @@ uniform sampler2DRectShadow shadowMap0;
uniform sampler2DRectShadow shadowMap1;
uniform sampler2DRectShadow shadowMap2;
uniform sampler2DRectShadow shadowMap3;
-uniform sampler2D noiseMap;
uniform sampler2DRect depthMap;
uniform mat4 shadow_matrix[6];
@@ -27,7 +28,7 @@ varying vec3 vary_ambient;
varying vec3 vary_directional;
varying vec3 vary_fragcoord;
varying vec3 vary_position;
-varying vec3 vary_light;
+varying vec3 vary_pointlight_col;
uniform float shadow_bias;
@@ -68,8 +69,6 @@ void main()
vec2 frag = vary_fragcoord.xy/vary_fragcoord.z*0.5+0.5;
frag *= screen_res;
- vec3 samp_pos = getPosition(frag).xyz;
-
float shadow = 1.0;
vec4 pos = vec4(vary_position, 1.0);
@@ -106,16 +105,21 @@ void main()
}
}
+ vec4 diff= texture2D(diffuseMap, gl_TexCoord[0].xy);
+
vec4 col = vec4(vary_ambient + vary_directional.rgb*shadow, gl_Color.a);
- vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy) * col;
+ vec4 color = diff * col;
color.rgb = atmosLighting(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
+ color.rgb += diff.rgb * vary_pointlight_col.rgb;
+
//gl_FragColor = gl_Color;
gl_FragColor = color;
- //gl_FragColor = vec4(1,0,1,1)*shadow;
+ //gl_FragColor.r = 0.0;
+ //gl_FragColor = vec4(1,shadow,1,1);
}