tweak bigblur border settings, add OS masking, add lottes preset

This commit is contained in:
hunterk 2016-10-21 13:19:52 -05:00
parent 2f618c239e
commit 26aa41ddd2
4 changed files with 84 additions and 7 deletions

View file

@ -6,11 +6,11 @@ scale0 = 4.0
filter_linear0 = false filter_linear0 = false
alias0 = Reference alias0 = Reference
shader1 = ../blurs/blur11fast-vertical.slang shader1 = ../blurs/blur11resize-vertical.slang
scale_type1 = source scale_type1 = source
scale1 = 0.5 scale1 = 0.5
shader2 = ../blurs/blur11fast-horizontal.slang shader2 = ../blurs/blur11resize-horizontal.slang
scale_type2 = source scale_type2 = source
scale2 = 0.5 scale2 = 0.5

View file

@ -3,11 +3,11 @@ shaders = 4
shader0 = ../misc/image-adjustment.slang shader0 = ../misc/image-adjustment.slang
alias0 = Reference alias0 = Reference
shader1 = ../blurs/blur11fast-vertical.slang shader1 = ../blurs/blur9fast-vertical.slang
scale_type1 = source scale_type1 = source
scale1 = 1.0 scale1 = 1.0
shader2 = ../blurs/blur11fast-horizontal.slang shader2 = ../blurs/blur9fast-horizontal.slang
scale_type2 = source scale_type2 = source
scale2 = 1.0 scale2 = 1.0

View file

@ -15,6 +15,10 @@ layout(push_constant) uniform Push
float in_res_x; float in_res_x;
float in_res_y; float in_res_y;
float border_on_top; float border_on_top;
float OS_MASK_TOP;
float OS_MASK_BOTTOM;
float OS_MASK_LEFT;
float OS_MASK_RIGHT;
} params; } params;
#pragma parameter box_scale "Image Scale" 4.0 1.0 10.0 1.0 #pragma parameter box_scale "Image Scale" 4.0 1.0 10.0 1.0
@ -23,6 +27,10 @@ layout(push_constant) uniform Push
#pragma parameter in_res_x "Viewport Size X" 320.0 100.0 600.0 1.0 #pragma parameter in_res_x "Viewport Size X" 320.0 100.0 600.0 1.0
#pragma parameter in_res_y "Viewport Size Y" 240.0 64.0 512.0 1.0 #pragma parameter in_res_y "Viewport Size Y" 240.0 64.0 512.0 1.0
#pragma parameter border_on_top "Show Viewport" 1.0 0.0 1.0 1.0 #pragma parameter border_on_top "Show Viewport" 1.0 0.0 1.0 1.0
#pragma parameter OS_MASK_TOP "OS Mask Top" 0.0 0.0 1.0 0.01
#pragma parameter OS_MASK_BOTTOM "OS Mask Bottom" 0.0 0.0 1.0 0.01
#pragma parameter OS_MASK_LEFT "OS Mask Left" 0.0 0.0 1.0 0.01
#pragma parameter OS_MASK_RIGHT "OS Mask Right" 0.0 0.0 1.0 0.01
layout(std140, set = 0, binding = 0) uniform UBO layout(std140, set = 0, binding = 0) uniform UBO
{ {
@ -45,7 +53,7 @@ void main()
screen_coord = middle + diff * scale; screen_coord = middle + diff * scale;
middle = vec2(0.4999, 0.4999); middle = vec2(0.4999, 0.4999);
vec2 dist = vTexCoord - middle; vec2 dist = vTexCoord - middle;
vTexCoord = TexCoord * 0.25 * vec2(1.25, 1.0); vTexCoord = TexCoord * 0.25 * vec2(1.35, 1.0);
} }
#pragma stage fragment #pragma stage fragment
@ -58,8 +66,8 @@ layout(set = 0, binding = 3) uniform sampler2D Reference;
void main() void main()
{ {
vec4 screen = texture(Reference, screen_coord); //the main video screen vec4 screen = texture(Reference, screen_coord); //the main video screen
vec4 background = texture(Source, vTexCoord + vec2(0.5)); //put your background function's output here vec4 background = texture(Source, vTexCoord + vec2(0.33, 0.40)); //put your background function's output here
if ( screen_coord.x < 0.9999 && screen_coord.x > 0.0001 && screen_coord.y < 0.9999 && screen_coord.y > 0.0001 && params.border_on_top > 0.5 ) if ( screen_coord.x < 0.9999 - params.OS_MASK_RIGHT && screen_coord.x > 0.0001 + params.OS_MASK_LEFT && screen_coord.y < 0.9999 - params.OS_MASK_BOTTOM && screen_coord.y > 0.0001 + params.OS_MASK_TOP && params.border_on_top > 0.5 )
background.a *= 0.0; background.a *= 0.0;
FragColor = vec4(mix(screen, background, background.a)); FragColor = vec4(mix(screen, background, background.a));
} }

View file

@ -0,0 +1,69 @@
shaders = 13
shader0 = ../crt/shaders/crt-lottes-multipass/linearize.slang
srgb_framebuffer0 = true
alias0 = "REFERENCE"
shader1 = ../crt/shaders/crt-lottes-multipass/horz3minus1.slang
srgb_framebuffer1 = true
scale_type1 = source
filter_linear1 = true
alias1 = horz3minus1
shader2 = ../crt/shaders/crt-lottes-multipass/horz3plus1.slang
srgb_framebuffer2 = true
scale_type2 = source
filter_linear2 = true
alias2 = horz3plus1
shader3 = ../crt/shaders/crt-lottes-multipass/horz5minus2.slang
srgb_framebuffer3 = true
scale_type3 = source
filter_linear3 = true
alias3 = horz5minus2
shader4 = ../crt/shaders/crt-lottes-multipass/horz5.slang
srgb_framebuffer4 = true
scale_type4 = source
filter_linear4 = true
alias4 = horz5
shader5 = ../crt/shaders/crt-lottes-multipass/horz5plus2.slang
srgb_framebuffer5 = true
scale_type5 = source
filter_linear5 = true
alias5 = horz5plus2
shader6 = ../crt/shaders/crt-lottes-multipass/horz7minus1.slang
srgb_framebuffer6 = true
scale_type6 = source
filter_linear6 = true
alias6 = horz7minus1
shader7 = ../crt/shaders/crt-lottes-multipass/horz7.slang
srgb_framebuffer7 = true
scale_type7 = source
filter_linear7 = true
alias7 = horz7
shader8 = ../crt/shaders/crt-lottes-multipass/horz7plus1.slang
srgb_framebuffer8 = true
scale_type8 = source
filter_linear8 = true
alias8 = horz7plus1
shader9 = ../crt/shaders/crt-lottes-multipass/crt-lottes-multipass.slang
scale_type9 = source
scale9 = 4.0
filter_linear9 = false
alias9 = Reference
shader10 = ../blurs/blur11resize-vertical.slang
scale_type10 = source
scale10 = 0.5
shader11 = ../blurs/blur11resize-horizontal.slang
scale_type11 = source
scale11 = 0.5
shader12 = ../border/shaders/bigblur.slang