summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/skyF.glsl10
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/skyV.glsl4
4 files changed, 11 insertions, 10 deletions
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
index 9116b86f39..291e160cdc 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
@@ -68,7 +68,7 @@ void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, o
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
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;
diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
index 97eeb302d9..372c782d74 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
@@ -106,7 +106,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
@@ -128,7 +128,8 @@ void main()
// Transparency (-> temp1)
// ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati
// compiler gets confused.
- temp1 = exp(-temp1 * temp2.z * dist_mul);
+ //temp1 = exp(-temp1 * temp2.z * dist_mul);
+ temp1 = exp(-temp1 * dist_mul);
// Compute haze glow
temp2.x = dot(Pn, lightnorm.xyz);
diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
index 74326f252e..eb5ab0f012 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
@@ -89,6 +89,7 @@ void main()
vec4 light_atten;
float dens_mul = density_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
@@ -110,8 +111,7 @@ void main()
// Transparency (-> temp1)
// ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati
// compiler gets confused.
- temp1 = exp(-temp1 * temp2.z * distance_multiplier);
-
+ temp1 = exp(-temp1 * dist_mul);
// Compute haze glow
temp2.x = dot(Pn, lightnorm.xyz);