GS/HW: Split up consecutive channel shuffles

This commit is contained in:
Stenzek authored and refractionpcsx2 committed 2023-02-15 11:04:05 +00:00
1 parent 51420dade4
commit f97191e241
2 files changed
+9 -2

No files matched your search

+6 -1
View File
@@ -1361,7 +1361,10 @@ void GSRendererHW::Draw()
if (m_channel_shuffle)
{
m_channel_shuffle = draw_sprite_tex && (m_context->TEX0.PSM == PSM_PSMT8) && single_page;
// NFSU2 does consecutive channel shuffles with blending, reducing the alpha channel over time.
// Fortunately, it seems to change the FBMSK along the way, so this check alone is sufficient.
m_channel_shuffle = draw_sprite_tex && m_context->TEX0.PSM == PSM_PSMT8 && single_page &&
m_last_channel_shuffle_fbmsk == m_context->FRAME.FBMSK;
if (m_channel_shuffle)
{
GL_CACHE("Channel shuffle effect detected SKIP");
@@ -1375,6 +1378,7 @@ void GSRendererHW::Draw()
{
GL_INS("Channel shuffle effect detected");
m_channel_shuffle = true;
m_last_channel_shuffle_fbmsk = m_context->FRAME.FBMSK;
}
else
{
@@ -1621,6 +1625,7 @@ void GSRendererHW::Draw()
{
GL_INS("Channel shuffle effect detected (2nd shot)");
m_channel_shuffle = true;
m_last_channel_shuffle_fbmsk = m_context->FRAME.FBMSK;
}
else
{
+3 -1
View File
@@ -107,8 +107,10 @@ private:
int m_skip = 0;
int m_skip_offset = 0;
bool m_tex_is_fb = false;
u32 m_last_channel_shuffle_fbmsk = 0;
bool m_channel_shuffle = false;
bool m_tex_is_fb = false;
bool m_userhacks_tcoffset = false;
float m_userhacks_tcoffset_x = 0.0f;
float m_userhacks_tcoffset_y = 0.0f;