Skip to content

Commit

Permalink
GS/HW: Fix 16bit depth conversion in shuffles + fix NFSU CRC
Browse files Browse the repository at this point in the history
  • Loading branch information
refractionpcsx2 committed Dec 22, 2023
1 parent fea213e commit 6a0bbea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pcsx2/GS/Renderers/HW/GSHwHack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -636,9 +636,9 @@ bool GSHwHack::GSC_NFSUndercover(GSRendererHW& r, int& skip)
v[0].XYZ.Y = static_cast<u16>(RCONTEXT->XYOFFSET.OFY + (r.m_r.w << 4));
v[0].U = r.m_r.z << 4;
v[0].V = r.m_r.w << 4;
RCONTEXT->scissor.in.z = r.m_r.z;
RCONTEXT->scissor.in.z = r.m_r.z * 2;
RCONTEXT->scissor.in.w = r.m_r.w;
r.m_vt.m_max.p.x = r.m_r.z;
r.m_vt.m_max.p.x = r.m_r.z * 2;
r.m_vt.m_max.p.y = r.m_r.w;
r.m_vt.m_max.t.x = r.m_r.z;
r.m_vt.m_max.t.y = r.m_r.w;
Expand Down
2 changes: 1 addition & 1 deletion pcsx2/GS/Renderers/HW/GSRendererHW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4298,7 +4298,7 @@ __ri void GSRendererHW::EmulateTextureSampler(const GSTextureCache::Target* rt,
// Require a float conversion if the texure is a depth otherwise uses Integral scaling
if (psm.depth)
{
m_conf.ps.depth_fmt = (tex->m_texture->GetType() != GSTexture::Type::DepthStencil) ? 3 : 1;
m_conf.ps.depth_fmt = (tex->m_texture->GetType() != GSTexture::Type::DepthStencil) ? 3 : tex->m_32_bits_fmt ? 1 : 2;
}

// Shuffle is a 16 bits format, so aem is always required
Expand Down

0 comments on commit 6a0bbea

Please sign in to comment.