diff options
author | Graham Linden <graham@lindenlab.com> | 2018-08-09 22:46:47 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-08-09 22:46:47 +0100 |
commit | facc678391417c5fa8ca659adc1d449bba2fd349 (patch) | |
tree | d41c4613a8bcb23ad6a35cef4c300e13fa23e4d9 /indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl | |
parent | fb13d9746d8aaf48e27f5eb80254abe17ce66019 (diff) |
MAINT-8951
Remove moon_dir related shader code causing sunlight shadow artifacting.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl index 4fccb1d33c..58f3f2f91e 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl @@ -59,7 +59,6 @@ uniform mat4 inv_proj; uniform vec2 screen_res; uniform vec2 proj_shadow_res; uniform vec3 sun_dir; -uniform vec3 moon_dir; uniform vec2 shadow_res; @@ -201,13 +200,10 @@ void main() }*/ float shadow = 0.0; - float da_sun = dot(norm, sun_dir.xyz); - float da_moon = dot(norm, moon_dir.xyz); - float da = max(da_sun, da_moon); - float dp_directional_light = max(0.0, da); + float dp_directional_light = max(0.0, dot(norm, sun_dir.xyz)); vec3 shadow_pos = pos.xyz; - vec3 offset = ((da_sun > da_moon) ? sun_dir.xyz : moon_dir.xyz) * (1.0-dp_directional_light); + vec3 offset = sun_dir.xyz * (1.0-dp_directional_light); vec4 spos = vec4(shadow_pos+offset*shadow_offset, 1.0); |