Add video_scale parameter directive in gb-pass1

This commit is contained in:
Alex Janka 2023-10-14 18:35:23 +11:00
parent 5fdf662cb4
commit 9877277344

View file

@ -26,6 +26,9 @@ layout(std140, set = 0, binding = 0) uniform UBO
// The amount of alpha swapped between neighboring texels // The amount of alpha swapped between neighboring texels
#pragma parameter adjacent_texel_alpha_blending "Neighbor Blending" 0.76 0.0 1.0 0.01 #pragma parameter adjacent_texel_alpha_blending "Neighbor Blending" 0.76 0.0 1.0 0.01
// Set video scale when used in console-border shaders
#pragma parameter video_scale "Video Scale" 3.0 2.0 20.0 1.0
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// // // //
// Gameboy Classic Shader v0.2.2 // // Gameboy Classic Shader v0.2.2 //
@ -87,7 +90,7 @@ void main()
blur_coords_lower_bound = vec2(0.0); blur_coords_lower_bound = vec2(0.0);
blur_coords_upper_bound = texel * (registers.OutputSize.xy - vec2(2.0)); blur_coords_upper_bound = texel * (registers.OutputSize.xy - vec2(2.0));
vec2 half_lcd_size = vec2(0.5) * ((registers.OriginalSize.xy * vec2(registers.video_scale)) / registers.OutputSize.xy); vec2 half_lcd_size = vec2(0.5) * ((registers.OriginalSize.xy * registers.video_scale) / registers.OutputSize.xy);
lcd_bounds_upleft = vec2(0.5) - half_lcd_size; lcd_bounds_upleft = vec2(0.5) - half_lcd_size;
lcd_bounds_downright = vec2(0.5) + half_lcd_size; lcd_bounds_downright = vec2(0.5) + half_lcd_size;
} }