diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index 661d814dac..a57acede81 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -349,14 +349,14 @@ void GSRendererHW::ConvertSpriteTextureShuffle(bool& write_ba, bool& read_ba) const u32 count = m_vertex.next; GSVertex* v = &m_vertex.buff[0]; const GIFRegXYOFFSET& o = m_context->XYOFFSET; - + const GSVertex first_vert = (v[0].XYZ.X <= v[m_vertex.tail - 2].XYZ.X) ? v[0] : v[m_vertex.tail - 2]; // vertex position is 8 to 16 pixels, therefore it is the 16-31 bits of the colors - const int pos = (v[0].XYZ.X - o.OFX) & 0xFF; + const int pos = (first_vert.XYZ.X - o.OFX) & 0xFF; write_ba = (pos > 112 && pos < 136); // Read texture is 8 to 16 pixels (same as above) const float tw = static_cast(1u << m_cached_ctx.TEX0.TW); - int tex_pos = (PRIM->FST) ? v[0].U : static_cast(tw * v[0].ST.S); + int tex_pos = (PRIM->FST) ? first_vert.U : static_cast(tw * first_vert.ST.S); tex_pos &= 0xFF; read_ba = (tex_pos > 112 && tex_pos < 144);