Merge pull request #84211 from clayjohn/a2c

Fix bug with alpha to coverage by enabling depth discard when using alpha to coverage
This commit is contained in:
Rémi Verschelde 2023-10-30 23:24:12 +01:00
commit 93cdacbb0a
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 4 additions and 8 deletions

View File

@ -1019,13 +1019,11 @@ void fragment_shader(in SceneData scene_data) {
#endif // ALPHA_ANTIALIASING_EDGE_USED
#ifdef MODE_RENDER_DEPTH
#ifdef USE_OPAQUE_PREPASS
#ifndef ALPHA_SCISSOR_USED
#if defined(USE_OPAQUE_PREPASS) || defined(ALPHA_ANTIALIASING_EDGE_USED)
if (alpha < scene_data.opaque_prepass_threshold) {
discard;
}
#endif // !ALPHA_SCISSOR_USED
#endif // USE_OPAQUE_PREPASS
#endif // USE_OPAQUE_PREPASS || ALPHA_ANTIALIASING_EDGE_USED
#endif // MODE_RENDER_DEPTH
#endif // !USE_SHADOW_TO_OPACITY

View File

@ -854,13 +854,11 @@ void main() {
#endif // ALPHA_ANTIALIASING_EDGE_USED
#ifdef MODE_RENDER_DEPTH
#ifdef USE_OPAQUE_PREPASS
#ifndef ALPHA_SCISSOR_USED
#if defined(USE_OPAQUE_PREPASS) || defined(ALPHA_ANTIALIASING_EDGE_USED)
if (alpha < scene_data.opaque_prepass_threshold) {
discard;
}
#endif // !ALPHA_SCISSOR_USED
#endif // USE_OPAQUE_PREPASS
#endif // USE_OPAQUE_PREPASS || ALPHA_ANTIALIASING_EDGE_USED
#endif // MODE_RENDER_DEPTH
#endif // !USE_SHADOW_TO_OPACITY