From 59ac365b52304432d1c68b8a5c00b5412f27c5e8 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Fri, 4 Dec 2020 00:32:16 +1000 Subject: [PATCH] GPU/HW: Extend the UV range to all "upscaled" pixels 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) --- src/core/gpu_hw_shadergen.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/gpu_hw_shadergen.cpp b/src/core/gpu_hw_shadergen.cpp index 4e3d677f9..3ab08f7b5 100644 --- a/src/core/gpu_hw_shadergen.cpp +++ b/src/core/gpu_hw_shadergen.cpp @@ -839,7 +839,10 @@ float4 SampleFromVRAM(uint4 texpage, float2 coords) #if UV_LIMITS float4 uv_limits = v_uv_limits; #if !PALETTE - uv_limits *= float4(RESOLUTION_SCALE, RESOLUTION_SCALE, RESOLUTION_SCALE, RESOLUTION_SCALE); + // 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 + 1)) - float(RESOLUTION_SCALE - 1); #endif #endif