From 054cb9e9fa9cb5ba994b2f459d2bf045c8372082 Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Sat, 12 Aug 2023 18:18:59 +0100 Subject: [PATCH] GS/HW: Correctly remove offset when detecting shuffle coords --- pcsx2/GS/Renderers/HW/GSRendererHW.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index 6d9cb30cd7..9bd050ccb1 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -2345,7 +2345,7 @@ void GSRendererHW::Draw() { // Hypothesis: texture shuffle is used as a postprocessing effect so texture will be an old target. // Initially code also tested the RT but it gives too much false-positive - const int first_x = (v[0].XYZ.X + 8) >> 4; + const int first_x = ((v[0].XYZ.X - m_context->XYOFFSET.OFX) + 8) >> 4; const int first_u = PRIM->FST ? ((v[0].U + 8) >> 4) : static_cast(((1 << m_cached_ctx.TEX0.TW) * (v[0].ST.S / v[1].RGBAQ.Q)) + 0.5f); const bool shuffle_coords = (first_x ^ first_u) & 8; const u32 draw_end = GSLocalMemory::GetEndBlockAddress(m_cached_ctx.FRAME.Block(), m_cached_ctx.FRAME.FBW, m_cached_ctx.FRAME.PSM, m_r) + 1;