mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-22 07:41:31 +11:00
Add video_scale parameter directive in gb-pass1
This commit is contained in:
parent
5fdf662cb4
commit
9877277344
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue