From df5de7730c72ebff6c78fd23aa47ebd787ce35e9 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Tue, 30 Mar 2021 01:40:04 +1000 Subject: [PATCH] GPU/HW: Disable depth buffering on transparent polygons These are the most likely to be coplanar and cause issues. --- src/core/gpu_hw.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index b45a1601a..4a57cf4be 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -576,8 +576,10 @@ void GPU_HW::LoadVertices() } else if (g_settings.gpu_pgxp_depth_buffer) { - SetBatchDepthBuffer(true); - CheckForDepthClear(vertices.data(), num_vertices); + const bool use_depth = (m_batch.transparency_mode == GPUTransparencyMode::Disabled); + SetBatchDepthBuffer(use_depth); + if (use_depth) + CheckForDepthClear(vertices.data(), num_vertices); } }