summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-02-01 13:41:31 -0800
committerGraham Linden <graham@lindenlab.com>2019-02-01 13:41:31 -0800
commit5a8610ccb7e1f5a0e4d54170ac922e6820ce3acb (patch)
tree13af4da0c897474ca41d7c797b15fe3148ad6ada /indra/newview/app_settings/shaders/class2/deferred
parent6716e543a160dd50913309834e7bd2d00034854c (diff)
SL-9996, SL-1130, SL-5546
Fix bug with setting texture matrix for rigged mesh. Fix z-fighting between sea and sky in ALM by cheating sky, stars, and moon using gl_FragDepth. Fix handling of atmospheric haze glow w.r.t independent sun/moon positioning (we can no longer depend on them being mutex to each other).
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/skyF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl2
2 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
index 792aa4e85c..7e2d41cf7b 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
@@ -45,7 +45,7 @@ uniform float density_multiplier;
uniform float max_y;
uniform vec4 glow;
-uniform float sun_up_factor;
+uniform float sun_moon_glow_factor;
uniform vec4 cloud_color;
@@ -153,7 +153,7 @@ void main()
// Add "minimum anti-solar illumination"
temp2.x += .25;
- //temp2.x *= sun_up_factor;
+ temp2.x *= sun_moon_glow_factor;
// Haze color above cloud
vec4 color = ( blue_horizon * blue_weight * (sunlight + ambient)
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 4fd3e73336..2c1cc3026f 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -91,7 +91,7 @@ void main()
float da_sun = dot(norm.xyz, normalize(sun_dir.xyz));
float da_moon = dot(norm.xyz, normalize(moon_dir.xyz));
- float da = max(da_sun, da_moon);
+ float da = (da_sun > 0.0) ? da_sun : da_moon;
da = clamp(da, 0.0, 1.0);
da = pow(da, global_gamma + 0.3);