GS: Fix fractional scaling in GL/Vulkan

This commit is contained in:
Connor McLaughlin 2022-10-18 00:04:00 +10:00 committed by refractionpcsx2
parent ec1a896795
commit c2823aae39
3 changed files with 2 additions and 6 deletions

View File

@ -233,7 +233,7 @@ void ps_convert_rgba_8i()
if (floor(PS_SCALE_FACTOR) != PS_SCALE_FACTOR)
coord = uvec2(vec2(coord) * PS_SCALE_FACTOR);
else
coord *= PS_SCALE_FACTOR;
coord *= uvec2(PS_SCALE_FACTOR);
vec4 pixel = texelFetch(TextureSampler, ivec2(coord), 0);
vec2 sel0 = (pos.y & 2u) == 0u ? pixel.rb : pixel.ga;

View File

@ -268,7 +268,7 @@ void ps_convert_rgba_8i()
if (floor(PS_SCALE_FACTOR) != PS_SCALE_FACTOR)
coord = uvec2(vec2(coord) * PS_SCALE_FACTOR);
else
coord *= PS_SCALE_FACTOR;
coord *= uvec2(PS_SCALE_FACTOR);
vec4 pixel = texelFetch(samp0, ivec2(coord), 0);
vec2 sel0 = (pos.y & 2u) == 0u ? pixel.rb : pixel.ga;

View File

@ -1,7 +1,3 @@
#ifndef PS_SCALE_FACTOR
#define PS_SCALE_FACTOR 1
#endif
#ifdef VERTEX_SHADER
layout(location = 0) in vec4 a_pos;