summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
diff options
context:
space:
mode:
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);
}