From fe27ebefc8e6d64083ff4396b9b58ef24b0a2110 Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Tue, 26 Apr 2022 15:34:36 +0100 Subject: [PATCH] GS: Ignore fractional parts when reducing tex ranges --- pcsx2/GS/GSState.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcsx2/GS/GSState.cpp b/pcsx2/GS/GSState.cpp index 33aca29834..d302c9d6ff 100644 --- a/pcsx2/GS/GSState.cpp +++ b/pcsx2/GS/GSState.cpp @@ -3201,16 +3201,16 @@ GSState::TextureMinMaxResult GSState::GetTextureMinMax(const GIFRegTEX0& TEX0, c if (wms != CLAMP_REGION_REPEAT && (wms != CLAMP_REPEAT || (static_cast(st.x) & ~tw_mask) != (static_cast(st.z) & ~tw_mask))) { if (int_rc.left < scissored_rc.left) - st.x += static_cast(scissored_rc.left - int_rc.left) * grad.x; + st.x += floor(static_cast(scissored_rc.left - int_rc.left)* grad.x); if (int_rc.right > scissored_rc.right) - st.z -= static_cast(int_rc.right - scissored_rc.right) * grad.x; + st.z -= floor(static_cast(int_rc.right - scissored_rc.right) * grad.x); } if (wmt != CLAMP_REGION_REPEAT && (wmt != CLAMP_REPEAT || (static_cast(st.y) & ~th_mask) != (static_cast(st.w) & ~th_mask))) { if (int_rc.top < scissored_rc.top) - st.y += static_cast(scissored_rc.top - int_rc.top) * grad.y; + st.y += floor(static_cast(scissored_rc.top - int_rc.top) * grad.y); if (int_rc.bottom > scissored_rc.bottom) - st.w -= static_cast(int_rc.bottom - scissored_rc.bottom) * grad.y; + st.w -= floor(static_cast(int_rc.bottom - scissored_rc.bottom) * grad.y); } } }