diff options
author | Brad Kittenbrink <brad@lindenlab.com> | 2022-11-28 16:24:53 -0800 |
---|---|---|
committer | Brad Kittenbrink <brad@lindenlab.com> | 2022-11-28 16:24:53 -0800 |
commit | a887c486b4064e66f6ba190633ccfd7f319ae855 (patch) | |
tree | ef510c087f4b5f568357e998aeffe5dc86bd945c /indra/newview/app_settings/shaders/class1/deferred/moonF.glsl | |
parent | 47166eba9e77130835d4a7ba5d116f538b50d375 (diff) | |
parent | 0b188ac04ecdb1d620a427eacbf5fc089e0accc8 (diff) |
Merge remote-tracking branch 'origin/DRTVWR-528' into DRTVWR-559
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/moonF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/moonF.glsl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl index b4044353b4..7032c45603 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl @@ -54,6 +54,12 @@ void main() fade = clamp( moon_dir.z*moon_dir.z*4.0, 0.0, 1.0 ); vec4 c = texture2D(diffuseMap, vary_texcoord0.xy); + + // SL-14113 Don't write to depth; prevent moon's quad from hiding stars which should be visible + // Moon texture has transparent pixels <0x55,0x55,0x55,0x00> + if (c.a <= 2./255.) // 0.00784 + discard; + // c.rgb = srgb_to_linear(c.rgb); c.rgb *= moonlight_color.rgb; c.rgb *= moon_brightness; @@ -67,6 +73,6 @@ void main() frag_data[1] = vec4(0.0); frag_data[2] = vec4(0.0, 0.0, 0.0, GBUFFER_FLAG_HAS_ATMOS); - gl_FragDepth = 0.999985f; + gl_FragDepth = LL_SHADER_CONST_CLOUD_MOON_DEPTH; // SL-14113 } |