Skip to content

Commit

Permalink
Merge pull request #84211 from clayjohn/a2c
Browse files Browse the repository at this point in the history
Fix bug with alpha to coverage by enabling depth discard when using alpha to coverage
  • Loading branch information
akien-mga committed Oct 30, 2023
2 parents 4c87145 + 57ba7de commit 93cdacb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 93cdacb

Please sign in to comment.