summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-06-05 08:58:28 -0700
committerGraham Linden <graham@lindenlab.com>2019-06-05 08:58:28 -0700
commit48401b224d778b21e4d8ae08365718591907d14b (patch)
tree0955de007d377e7c88d2d6db6d0e5859e0e18370 /indra/newview/app_settings/shaders/class2/deferred
parent42ddf24b8e206029f3fc9a4b3c1bd7138c1a849b (diff)
SL-9989
Clamp fog distance multiplier to >= 0.05 and adjust min range on control as well. Make sky shaders use dist mul consistently.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/skyF.glsl10
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
index dcd639caff..921f87cf14 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
@@ -120,7 +120,7 @@ void main()
vec4 light_atten;
float dens_mul = density_multiplier;
- float dist_mul = distance_multiplier;
+ float dist_mul = max(0.05, distance_multiplier);
// Sunlight attenuation effect (hue and brightness) due to atmosphere
// this is used later for sunlight modulation at various altitudes
@@ -169,13 +169,13 @@ void main()
// Increase ambient when there are more clouds
vec4 tmpAmbient = ambient_color;
- tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5;
+ tmpAmbient += max(vec4(0), (1. - ambient_color)) * cloud_shadow * 0.5;
// Dim sunlight by cloud shadow percentage
- sunlight *= (1. - cloud_shadow);
+ sunlight *= max(0.0, (1. - cloud_shadow));
// Haze color below cloud
- vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient)
+ vec4 additiveColorBelowCloud = (blue_horizon * blue_weight * (sunlight + tmpAmbient)
+ (haze_horizon * haze_weight) * (sunlight * temp2.x + tmpAmbient)
);
@@ -192,7 +192,7 @@ void main()
vec3 halo_22 = halo22(optic_d);
- color.rgb += rainbow(optic_d);
+ color.rgb += rainbow(optic_d);
color.rgb += halo_22;