diff options
author | Runitai Linden <davep@lindenlab.com> | 2020-03-24 11:58:31 -0500 |
---|---|---|
committer | Runitai Linden <davep@lindenlab.com> | 2020-03-24 11:58:31 -0500 |
commit | cbe83442790927349d5d7a374c80185d761c1f41 (patch) | |
tree | 84f985bbcb891e1d3ecc78a3e92b76d41bcc698c /indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl | |
parent | 3d22273726ab4d40f2eb9afc5ceeac37471a9dfa (diff) | |
parent | 1370c6d0c03ed81c47db19a1cae78fdc272d9729 (diff) |
Merge branch 'DRTVWR-440' of bitbucket.org:lindenlab/viewer into davep/DRTVWR-440
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl | 29 |
1 files changed, 16 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 8e90c1481f..caa4fe1f65 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl @@ -67,13 +67,28 @@ uniform vec4 cloud_color; uniform float cloud_scale; +// NOTE: Keep these in sync! +// indra\newview\app_settings\shaders\class1\deferred\skyV.glsl +// indra\newview\app_settings\shaders\class1\deferred\cloudsV.glsl +// indra\newview\lllegacyatmospherics.cpp 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); @@ -87,6 +102,7 @@ void main() } else { + altitude_blend_factor = 0; // SL-11589 Fix clouds drooping below horizon P *= (-32000. / P.y); } @@ -175,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; |