summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl2
2 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
index 20ab0fb171..8e90c1481f 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
@@ -78,7 +78,7 @@ void main()
// Get relative position
vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0);
- altitude_blend_factor = (P.y > -4096.0) ? 1.0 : 1.0 - clamp(abs(P.y) / max_y, 0.0, 1.0);
+ altitude_blend_factor = clamp((P.y + 512.0) / max_y, 0.0, 1.0);
// Set altitude
if (P.y > 0.)
diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
index 18daa5a242..2c1475d547 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
@@ -78,7 +78,7 @@ void main()
vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0);
// fade clouds beyond a certain point so the bottom of the sky dome doesn't look silly at high altitude
- altitude_blend_factor = (P.y > -4096.0) ? 1.0 : 1.0 - clamp(abs(P.y) / max_y, 0.0, 1.0);
+ altitude_blend_factor = clamp((P.y + 512.0) / max_y, 0.0, 1.0);
// Set altitude
if (P.y > 0.)