From 9ea163e66648d09ba1eaaafe91728d6193526bc4 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Tue, 2 Jun 2020 20:47:10 +1000 Subject: [PATCH] GPU/D3D11: Fix mask test in same vertex batch Fixes shadows in Bust a Groove 2, probably others. --- src/core/gpu_hw_shadergen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/gpu_hw_shadergen.cpp b/src/core/gpu_hw_shadergen.cpp index 7aa7fd4a8..52005eaec 100644 --- a/src/core/gpu_hw_shadergen.cpp +++ b/src/core/gpu_hw_shadergen.cpp @@ -510,7 +510,7 @@ std::string GPU_HW_ShaderGen::GenerateBatchVertexShader(bool textured) v_pos = float4(pos_x, pos_y, 0.0, 1.0); #if API_D3D11 - v_depth = 1.0 - (float(u_base_vertex_depth_id + (u_check_mask_before_draw ? 0u : v_id)) / 65535.0); + v_depth = 1.0 - (float(u_base_vertex_depth_id + (u_check_mask_before_draw ? v_id : 0u)) / 65535.0); #else v_depth = 1.0 - (float(v_id - u_base_vertex_depth_id) / 65535.0); #endif