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/windlight | |
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/windlight')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/windlight/moonF.glsl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/windlight/moonF.glsl b/indra/newview/app_settings/shaders/class1/windlight/moonF.glsl index f03003f5e1..c4ab0c95dc 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/moonF.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/moonF.glsl @@ -51,6 +51,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 = pow(c.rgb, vec3(0.7f)); // can't use "srgb_to_linear(color.rgb)" as that is a deferred only function c.rgb *= moonlight_color.rgb; c.rgb *= moon_brightness; @@ -61,5 +67,6 @@ void main() c.rgb = scaleSoftClip(c.rgb); frag_color = vec4(c.rgb, c.a); + gl_FragDepth = LL_SHADER_CONST_CLOUD_MOON_DEPTH; // SL-14113 } |