Skip to content

Commit

Permalink
GS: PreRound Sprite Hack - Don't round recursive draws.
Browse files Browse the repository at this point in the history
  • Loading branch information
refractionpcsx2 committed Jul 2, 2022
1 parent 680e0e5 commit 30138f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions pcsx2/GS/GSState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1849,6 +1849,19 @@ void GSState::FlushPrim()
GSVertex* v1 = &m_vertex.buff[i];
GSVertex* v2 = &m_vertex.buff[i + 1];

//Don't round recursive draws, it gets nasty..
if ((i + 3) < m_vertex.tail)
{
GSVertex* nv1 = &m_vertex.buff[i + 2];
GSVertex* nv2 = &m_vertex.buff[i + 3];

GSVector4i cur_rect = { v1->U >> 4, v1->V >> 4, v2->U >> 4, v2->V >> 4 };
GSVector4i next_rect = { nv1->U >> 4, nv1->V >> 4, nv2->U >> 4, nv2->V >> 4 };
if (!cur_rect.rintersect(next_rect).rempty())
break;
//DevCon.Warning("V %x %x U %x %x", vv->V, m_vertex.buff[i + 2].V, vu->U, m_vertex.buff[i + 2].U);
}

GSVertex* vu;
GSVertex* vv;
if (v1->U > v2->U)
Expand Down
2 changes: 1 addition & 1 deletion pcsx2/GS/Renderers/Common/GSRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ bool GSRenderer::Merge(int field)
{
// We do half because FFMD is a half sized framebuffer, then we offset by 1 in the shader for the actual interlace
if(GetUpscaleMultiplier() > 1)
interlace_offset += ((((tex[1] ? tex[1]->GetScale().y : tex[0]->GetScale().y) + 0.5f) * 0.5f) - 1.0f) * static_cast<float>(field ^ field2);
interlace_offset += ((((tex[1] ? tex[1]->GetScale().y : tex[0]->GetScale().y)) * 0.5f)) * static_cast<float>(field ^ field2);
offset = 1.0f;
}
// Restore manually offset "interlace" lines
Expand Down

0 comments on commit 30138f8

Please sign in to comment.