summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-06-12 18:42:07 +0100
committerGraham Linden <graham@lindenlab.com>2018-06-12 18:42:07 +0100
commit67ab0084f87c40bf31d7fadded55cc9ea6299ca2 (patch)
tree1d8119cd8d0b6078724a8128da37c15321a9f703 /indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
parent327ded51298599a0057c4a3baf388956ecfed2e5 (diff)
Fix env panel forward action.
Make env panel update environment when jumping frame to frame. Add separate funcs for sun/moon vectors in various coord systems. Make haze glow only pay attention to sun (i.e. fix sun glow when moon is near horizon in daytime).
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 2234ceeb53..8dda96984e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -43,6 +43,7 @@ uniform mat3 env_mat;
uniform mat3 ssao_effect_mat;
uniform vec3 sun_dir;
+uniform vec3 moon_dir;
#if HAS_SHADOW
uniform sampler2DShadow shadowMap0;
@@ -287,7 +288,10 @@ void main()
vec2 abnormal = encode_normal(norm.xyz);
norm.xyz = decode_normal(abnormal.xy);
- float da = dot(norm.xyz, sun_dir.xyz);
+ float da_sun = dot(norm.xyz, sun_dir.xyz);
+ float da_moon = dot(norm.xyz, moon_dir.xyz);
+
+ float da = max(da_sun, da_moon);
float final_da = da;
final_da = min(final_da, shadow);