mirror of https://github.com/PCSX2/pcsx2.git
GS/HW: Improve half right detection on shuffles
This commit is contained in:
parent
eaf3b7943c
commit
1668ec2fc6
|
@ -431,7 +431,23 @@ void GSRendererHW::ConvertSpriteTextureShuffle(bool& write_ba, bool& read_ba, GS
|
|||
// No super source of truth here, since the width can get batted around, the valid is probably our best bet.
|
||||
const int tex_width = tex->m_target ? tex->m_from_target->m_valid.z : (tex->m_TEX0.TBW * 64);
|
||||
const int tex_tbw = tex->m_target ? tex->m_from_target_TEX0.TBW : tex->m_TEX0.TBW;
|
||||
if ((static_cast<int>(m_cached_ctx.TEX0.TBW * 64) >= std::min(tex_width * 2, 1024) && tex_tbw != m_cached_ctx.TEX0.TBW) || (m_cached_ctx.TEX0.TBW * 64) < floor(m_vt.m_max.t.x))
|
||||
const int clamp_minu = m_context->CLAMP.MINU;
|
||||
const int clamp_maxu = m_context->CLAMP.MAXU;
|
||||
int max_tex_draw_width = std::min(static_cast<int>(m_vt.m_max.t.x), 1 << m_cached_ctx.TEX0.TW);
|
||||
|
||||
switch (m_context->CLAMP.WMS)
|
||||
{
|
||||
case CLAMP_REGION_CLAMP:
|
||||
max_tex_draw_width = std::min(max_tex_draw_width, clamp_maxu);
|
||||
break;
|
||||
case CLAMP_REGION_REPEAT:
|
||||
max_tex_draw_width = std::min(max_tex_draw_width, (clamp_maxu | clamp_minu));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if ((static_cast<int>(m_cached_ctx.TEX0.TBW * 64) >= std::min(tex_width * 2, 1024) && tex_tbw != m_cached_ctx.TEX0.TBW) || (m_cached_ctx.TEX0.TBW * 64) < floor(max_tex_draw_width))
|
||||
{
|
||||
half_right_uv = false;
|
||||
half_right_vert = false;
|
||||
|
|
Loading…
Reference in New Issue