From 9fcf6bf196a2e117cb60fc05819ee4d556a2bf81 Mon Sep 17 00:00:00 2001 From: nfp0 Date: Sat, 7 May 2022 17:27:21 +0100 Subject: [PATCH] gb-pass5 - determine border size from SourceSize and OriginalSize. Use only Y for compatibility with non-square pixel consoles. --- handheld/console-border/shader-files/gb-pass-5.slang | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handheld/console-border/shader-files/gb-pass-5.slang b/handheld/console-border/shader-files/gb-pass-5.slang index 247b949..8311469 100644 --- a/handheld/console-border/shader-files/gb-pass-5.slang +++ b/handheld/console-border/shader-files/gb-pass-5.slang @@ -4,6 +4,7 @@ layout(push_constant) uniform Push { vec4 OutputSize; vec4 SourceSize; + vec4 OriginalSize; float video_scale; } params; @@ -11,7 +12,7 @@ layout(push_constant) uniform Push vec2 middle = vec2(0.5, 0.5); vec2 screen_scale = params.OutputSize.xy * params.SourceSize.zw; -vec2 border_scale = vec2(800, 400) * params.video_scale; +vec2 border_scale = vec2(800, 400) * (params.SourceSize.y / params.OriginalSize.y); layout(std140, set = 0, binding = 0) uniform UBO {