summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-08-10 09:43:52 -0700
committerRider Linden <rider@lindenlab.com>2018-08-10 09:43:52 -0700
commit30ef616af5cfbb552458e88acd9f803aa076a08b (patch)
treef78220eae5466d06f7b5c2f0fb12bdfaec4ee8da /indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
parent7a001186b3063c36a78b2537b81c75124e307ff7 (diff)
parent44e1d3f7dcac3fafbaaf1281538e92f87a8cc8d1 (diff)
Merge
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl9
1 files changed, 2 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
index 11ccdf638c..aa5e99a2f7 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.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;
uniform float shadow_bias;
@@ -140,14 +139,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);