GPU/HW: Fix incorrect sampling at 1x with TC
This commit is contained in:
parent
0076af6974
commit
0ae8fcced3
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
#include "common/types.h"
|
||||
|
||||
static constexpr u32 SHADER_CACHE_VERSION = 20;
|
||||
static constexpr u32 SHADER_CACHE_VERSION = 21;
|
||||
|
|
Loading…
Reference in New Issue