From 98f0e5908b7573e45b4d6335de2dec82d94e95ca Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 24 Jun 2021 14:45:15 +1000 Subject: [PATCH] GPU/HW: Fix incorrect UV range for upscaled direct texturing --- src/core/gpu_hw_shadergen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/gpu_hw_shadergen.cpp b/src/core/gpu_hw_shadergen.cpp index 83e329ec5..b6fa26f29 100644 --- a/src/core/gpu_hw_shadergen.cpp +++ b/src/core/gpu_hw_shadergen.cpp @@ -848,8 +848,8 @@ float4 SampleFromVRAM(uint4 texpage, float2 coords) #if !PALETTE // Extend the UV range to all "upscaled" pixels. This means 1-pixel-high polygon-based // framebuffer effects won't be downsampled. (e.g. Mega Man Legends 2 haze effect) - uv_limits.xy *= float(RESOLUTION_SCALE); - uv_limits.zw = (uv_limits.zw * float(RESOLUTION_SCALE + 1u)) - float(RESOLUTION_SCALE - 1u); + uv_limits *= float(RESOLUTION_SCALE); + uv_limits.zw += float(RESOLUTION_SCALE - 1u); #endif #endif