From b17335d81287d620fecbe5691d38cd4a6b3ad597 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 20 Aug 2020 00:49:42 +1000 Subject: [PATCH] GTE: Increase z precision in PGXP mode --- src/core/gte.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/gte.cpp b/src/core/gte.cpp index 12cda54ad..54694587a 100644 --- a/src/core/gte.cpp +++ b/src/core/gte.cpp @@ -625,7 +625,7 @@ static void RTPS(const s16 V[3], u8 shift, bool lm, bool last) if (g_settings.gpu_pgxp_enable) { // this can potentially use increased precision on Z - const float precise_z = std::max((float)REGS.H / 2.f, (float)REGS.SZ3); + const float precise_z = std::max((float)REGS.H / 2.f, (float)z / 4096.0f); const float precise_h_div_sz = (float)REGS.H / precise_z; const float fofx = ((float)REGS.OFX / (float)(1 << 16)); const float fofy = ((float)REGS.OFY / (float)(1 << 16));