From f9d9c9724c43b42bf26457f56a845dc0f87f3f13 Mon Sep 17 00:00:00 2001 From: nfp0 Date: Wed, 4 May 2022 01:16:25 +0100 Subject: [PATCH] Fix gbpass scaling misalignment --- handheld/console-border/shader-files/gb-pass0.slang | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/handheld/console-border/shader-files/gb-pass0.slang b/handheld/console-border/shader-files/gb-pass0.slang index f0bdaad..4a18e5d 100644 --- a/handheld/console-border/shader-files/gb-pass0.slang +++ b/handheld/console-border/shader-files/gb-pass0.slang @@ -76,17 +76,14 @@ layout(location = 3) out vec2 one_texel; //#define video_scale floor(registers.OutputSize.y * registers.SourceSize.w) <- moved to parameter // Size of the scaled video -//#define scaled_video_out (registers.SourceSize.xy * vec2(video_scale)) <- moved to parameter - -//it's... half a pixel -#define half_pixel (vec2(0.5) * registers.OutputSize.zw) +//#define scaled_video_out (registers.SourceSize.xy * vec2(video_scale)) <- moved to parameter void main() { vec2 scaled_video_out = (registers.SourceSize.xy * vec2(registers.video_scale)); // Remaps position to integer scaled output gl_Position = global.MVP * Position / vec4( vec2(registers.OutputSize.xy / scaled_video_out), 1.0, 1.0 ); - vTexCoord = TexCoord + half_pixel; + vTexCoord = TexCoord; dot_size = registers.SourceSize.zw; one_texel = 1.0 / (registers.SourceSize.xy * registers.video_scale); }