Skip to content

Commit

Permalink
GS/HW: Check both edges of current triangle for quads
Browse files Browse the repository at this point in the history
  • Loading branch information
refractionpcsx2 committed Mar 24, 2024
1 parent 2a6d71c commit 452f9e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pcsx2/GS/GSState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2823,7 +2823,9 @@ bool GSState::TrianglesAreQuads() const
{
const u16* const prev_tri= m_index.buff + (idx - 3);
const GSVertex& vert = v[i[0]];
if (vert.XYZ != m_vertex.buff[prev_tri[0]].XYZ && vert.XYZ != m_vertex.buff[prev_tri[1]].XYZ && vert.XYZ != m_vertex.buff[prev_tri[2]].XYZ)
const GSVertex& last_vert = v[i[2]];
if (vert.XYZ != m_vertex.buff[prev_tri[0]].XYZ && vert.XYZ != m_vertex.buff[prev_tri[1]].XYZ && vert.XYZ != m_vertex.buff[prev_tri[2]].XYZ &&
last_vert.XYZ != m_vertex.buff[prev_tri[0]].XYZ && last_vert.XYZ != m_vertex.buff[prev_tri[1]].XYZ && last_vert.XYZ != m_vertex.buff[prev_tri[2]].XYZ)
return false;
}
// Degenerate triangles should've been culled already, so we can check indices.
Expand Down

0 comments on commit 452f9e4

Please sign in to comment.