summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl10
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
index 1ea57516a4..1bd5f5a718 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
@@ -35,7 +35,7 @@ in vec2 vary_fragcoord;
uniform vec3 sun_dir;
uniform float shadow_bias;
-vec3 getNorm(vec2 pos_screen);
+vec4 getNorm(vec2 pos_screen);
vec4 getPosition(vec2 pos_screen);
float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen);
@@ -45,13 +45,13 @@ void main()
{
vec2 pos_screen = vary_fragcoord.xy;
vec4 pos = getPosition(pos_screen);
- vec3 norm = getNorm(pos_screen);
+ vec4 norm = getNorm(pos_screen);
vec4 col;
- col.r = sampleDirectionalShadow(pos.xyz, norm, pos_screen);
+ col.r = sampleDirectionalShadow(pos.xyz, norm.xyz, pos_screen);
col.g = 1.0f;
- col.b = sampleSpotShadow(pos.xyz, norm, 0, pos_screen);
- col.a = sampleSpotShadow(pos.xyz, norm, 1, pos_screen);
+ col.b = sampleSpotShadow(pos.xyz, norm.xyz, 0, pos_screen);
+ col.a = sampleSpotShadow(pos.xyz, norm.xyz, 1, pos_screen);
frag_color = clamp(col, vec4(0), vec4(1));
}