From d0d5d991ce551ea768eeb7bb45159518bbf445a3 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 17 Feb 2023 01:58:20 +1000 Subject: [PATCH] GS/HW: Fix repeat sampler being used for region clamp/repeat The coordinates are clamped in the shader, but normalized UV of 1 and bilinear may repeat. --- pcsx2/GS/Renderers/HW/GSRendererHW.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index 510947f002..310bad0a02 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -3353,8 +3353,8 @@ void GSRendererHW::EmulateTextureSampler(const GSTextureCache::Source* tex) m_conf.cb_vs.texture_scale = GSVector2(tc_oh_ts.x, tc_oh_ts.y); // Only enable clamping in CLAMP mode. REGION_CLAMP will be done manually in the shader - m_conf.sampler.tau = (wms != CLAMP_CLAMP); - m_conf.sampler.tav = (wmt != CLAMP_CLAMP); + m_conf.sampler.tau = (wms == CLAMP_REPEAT); + m_conf.sampler.tav = (wmt == CLAMP_REPEAT); if (shader_emulated_sampler) { m_conf.sampler.biln = 0;