diff --git a/src/core/gpu_hw_shadergen.cpp b/src/core/gpu_hw_shadergen.cpp index 997cd86e9..e85738c17 100644 --- a/src/core/gpu_hw_shadergen.cpp +++ b/src/core/gpu_hw_shadergen.cpp @@ -880,13 +880,17 @@ float4 SampleFromVRAM(TEXPAGE_VALUE texpage, float2 coords) float4 SampleFromPageTexture(float2 coords) { // Cached textures. -#if UPSCALED == 0 - float2 fpart = coords - roundEven(coords); -#else - float2 fpart = frac(coords); -#endif uint2 icoord = ApplyTextureWindow(FloatToIntegerCoords(coords)); - coords = (float2(icoord) + fpart) * (1.0f / 256.0f); +#if UPSCALED + float2 fpart = frac(coords); + coords = (float2(icoord) + fpart); +#else + // Drop fractional part. + coords = float2(icoord); +#endif + + // Normalize. + coords = coords * (1.0f / 256.0f); return SAMPLE_TEXTURE(samp0, coords); } diff --git a/src/core/shader_cache_version.h b/src/core/shader_cache_version.h index 9d926866a..89fec6d32 100644 --- a/src/core/shader_cache_version.h +++ b/src/core/shader_cache_version.h @@ -5,4 +5,4 @@ #include "common/types.h" -static constexpr u32 SHADER_CACHE_VERSION = 20; +static constexpr u32 SHADER_CACHE_VERSION = 21;