summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1
diff options
context:
space:
mode:
authorMichael Pohoreski <ptolemy@lindenlab.com>2020-03-19 17:16:43 +0000
committerMichael Pohoreski <ptolemy@lindenlab.com>2020-03-19 17:16:43 +0000
commit1370c6d0c03ed81c47db19a1cae78fdc272d9729 (patch)
tree9031cf7514d94462f8c3882ed259b8f4cfb8f6e9 /indra/newview/app_settings/shaders/class1
parent34fe06290aa2e985538080ad2db06a07a6b007e6 (diff)
parentcbc3c51daf5b6f7ae483fac8522095dea31d582d (diff)
Merged in SL-11589 (pull request #44)
SL-11589 Approved-by: Dave Houlton <euclid@lindenlab.com>
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl25
1 files changed, 12 insertions, 13 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
index bc51d25309..caa4fe1f65 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
@@ -77,7 +77,18 @@ void main()
// World / view / projection
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ // Texture coords
vary_texcoord0 = texcoord0;
+ vary_texcoord0.xy -= 0.5;
+ vary_texcoord0.xy /= cloud_scale;
+ vary_texcoord0.xy += 0.5;
+
+ vary_texcoord1 = vary_texcoord0;
+ vary_texcoord1.x += lightnorm.x * 0.0125;
+ vary_texcoord1.y += lightnorm.z * 0.0125;
+
+ vary_texcoord2 = vary_texcoord0 * 16.;
+ vary_texcoord3 = vary_texcoord1 * 16.;
// Get relative position
vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0);
@@ -91,6 +102,7 @@ void main()
}
else
{
+ altitude_blend_factor = 0; // SL-11589 Fix clouds drooping below horizon
P *= (-32000. / P.y);
}
@@ -179,19 +191,6 @@ void main()
vary_CloudDensity = 2. * (cloud_shadow - 0.25);
- // Texture coords
- vary_texcoord0 = texcoord0;
- vary_texcoord0.xy -= 0.5;
- vary_texcoord0.xy /= cloud_scale;
- vary_texcoord0.xy += 0.5;
-
- vary_texcoord1 = vary_texcoord0;
- vary_texcoord1.x += lightnorm.x * 0.0125;
- vary_texcoord1.y += lightnorm.z * 0.0125;
-
- vary_texcoord2 = vary_texcoord0 * 16.;
- vary_texcoord3 = vary_texcoord1 * 16.;
-
// Combine these to minimize register use
vary_CloudColorAmbient += oHazeColorBelowCloud;