diff options
author | Michael Pohoreski <ptolemy@lindenlab.com> | 2021-04-29 21:23:25 +0000 |
---|---|---|
committer | Michael Pohoreski <ptolemy@lindenlab.com> | 2021-04-29 21:23:25 +0000 |
commit | 54d4406df7b342c0ecd5f79829ba0bb526b97d8b (patch) | |
tree | 2def8572891901526e41b84e2780725db25db527 /indra/newview/app_settings/shaders/class1/windlight | |
parent | 59ab227c4020565f85e6fc2edf3e3fcc16abb574 (diff) | |
parent | 8fc6fcc0a6f1427e58ea35e5cab53af6f79f1be4 (diff) |
Merged in SL-14113 (pull request #526)
SL-14113
Approved-by: Euclid Linden
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 2425a2ad04..2e0932343b 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/moonF.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/moonF.glsl @@ -52,6 +52,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; @@ -62,5 +68,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 } |