diff options
author | Graham Linden <graham@lindenlab.com> | 2019-06-05 08:58:28 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-06-05 08:58:28 -0700 |
commit | 48401b224d778b21e4d8ae08365718591907d14b (patch) | |
tree | 0955de007d377e7c88d2d6db6d0e5859e0e18370 /indra/newview/app_settings/shaders/class2/windlight | |
parent | 42ddf24b8e206029f3fc9a4b3c1bd7138c1a849b (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/windlight')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl | 5 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class2/windlight/skyV.glsl | 4 |
2 files changed, 5 insertions, 4 deletions
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); |