mirror of https://github.com/PCSX2/pcsx2.git
GS/HW: Update vertex trace in ReplaceVerticesWithSprite()
This commit is contained in:
parent
13c9e0e666
commit
9ce2ae613b
|
@ -5964,6 +5964,9 @@ void GSRendererHW::ReplaceVerticesWithSprite(const GSVector4i& unscaled_rect, co
|
|||
|
||||
v[0].XYZ.X = static_cast<u16>(m_context->XYOFFSET.OFX + fpr.x);
|
||||
v[0].XYZ.Y = static_cast<u16>(m_context->XYOFFSET.OFY + fpr.y);
|
||||
v[0].XYZ.Z = v[1].XYZ.Z;
|
||||
v[0].RGBAQ = v[1].RGBAQ;
|
||||
v[0].FOG = v[1].FOG;
|
||||
|
||||
v[1].XYZ.X = static_cast<u16>(m_context->XYOFFSET.OFX + fpr.z);
|
||||
v[1].XYZ.Y = static_cast<u16>(m_context->XYOFFSET.OFY + fpr.w);
|
||||
|
@ -5982,6 +5985,23 @@ void GSRendererHW::ReplaceVerticesWithSprite(const GSVector4i& unscaled_rect, co
|
|||
GSVector4::storeh(&v[1].ST.S, st);
|
||||
}
|
||||
|
||||
// Fix up vertex trace.
|
||||
m_vt.m_min.p.x = unscaled_rect.x;
|
||||
m_vt.m_min.p.y = unscaled_rect.y;
|
||||
m_vt.m_min.p.z = v[0].XYZ.Z;
|
||||
m_vt.m_max.p.x = unscaled_rect.z;
|
||||
m_vt.m_max.p.y = unscaled_rect.w;
|
||||
m_vt.m_max.p.z = v[0].XYZ.Z;
|
||||
m_vt.m_min.t.x = unscaled_uv_rect.x;
|
||||
m_vt.m_min.t.y = unscaled_uv_rect.y;
|
||||
m_vt.m_max.t.x = unscaled_uv_rect.z;
|
||||
m_vt.m_max.t.y = unscaled_uv_rect.w;
|
||||
m_vt.m_min.c = GSVector4i(v[0].RGBAQ.U32[0]).u8to32();
|
||||
m_vt.m_max.c = m_vt.m_min.c;
|
||||
m_vt.m_eq.rgba = 0xFFFF;
|
||||
m_vt.m_eq.z = true;
|
||||
m_vt.m_eq.f = true;
|
||||
|
||||
m_vertex.head = m_vertex.tail = m_vertex.next = 2;
|
||||
m_index.tail = 2;
|
||||
|
||||
|
|
Loading…
Reference in New Issue