Skip to content

Commit

Permalink
Fix bug with alpha to coverage by enabling depth discard when using a…
Browse files Browse the repository at this point in the history
…lpha to coverage
  • Loading branch information
clayjohn committed Oct 30, 2023
1 parent 9144457 commit 57ba7de
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 57ba7de

Please sign in to comment.