diff options
author | Graham Linden <graham@lindenlab.com> | 2019-01-24 14:54:11 -0800 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-01-24 14:54:11 -0800 |
commit | 966dc7fc8fb1fade861e8070e9c5fbbfe4d0cb45 (patch) | |
tree | a1cbc6e22bf8e443a32aab1cd78e0fc6049e3674 /indra/newview/app_settings/shaders/class3/deferred/cloudsV.glsl | |
parent | a6f92d8190e8771d6a3372eb456dbb97c7ca0c8d (diff) |
SL-10276
SL-9851
Fix cloud shaders to ignore clouds when cloud_scale is 0.
Fix creation of heavenly body geo to avoid degenerate vector math
and not randomly flip orientation when crossing zenith.
Add sun_up_factor to eliminate sun glow around moon when sun is down.
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred/cloudsV.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/cloudsV.glsl | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class3/deferred/cloudsV.glsl index 53b6d88ef5..71e422ddf0 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/cloudsV.glsl @@ -49,22 +49,22 @@ void main() { vary_pos = position; - // World / view / projection - gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); + // 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; + // Texture coords + vary_texcoord0 = texcoord0; + vary_texcoord0.xy -= 0.5; + vary_texcoord0.xy /= max(0.001, cloud_scale); vary_texcoord0.xy += 0.5; - vary_texcoord1 = vary_texcoord0; - vary_texcoord1.x += lightnorm.x * 0.0125; + 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.; + vary_texcoord2 = vary_texcoord0 * 16.; + vary_texcoord3 = vary_texcoord1 * 16.; - // END CLOUDS + // END CLOUDS } |