diff --git a/border/blur_fill.slangp b/border/blur_fill.slangp index c484d7f..60c9a67 100644 --- a/border/blur_fill.slangp +++ b/border/blur_fill.slangp @@ -1,82 +1,89 @@ -shaders = 10 +shaders = 12 -parameters = "BLUR_RADIUS" +parameters = "SIGMA;BLUR_RADIUS" +SIGMA = 1.0 BLUR_RADIUS = 2.0 shader0 = ../blurs/shaders/kawase/linearize.slang scale_type0 = source -scale_x0 = 1.0 -scale_y0 = 1.0 +scale0 = 1.0 float_framebuffer0 = true alias0 = "Input" -shader1 = shaders/blur_fill/render_sampling_areas.slang -scale_type1 = viewport -scale_x1 = 0.2 -scale_y1 = 0.2 +shader1 = ../blurs/shaders/gauss_4tap/gauss_2tap_h.slang +filter_linear1 = true +scale_type1 = source +scale1 = 1.0 float_framebuffer1 = true -alias1 = "Tiled" +wrap_mode1 = mirrored_repeat -shader2 = ../blurs/shaders/dual_filter/downsample.slang +shader2 = ../blurs/shaders/gauss_4tap/gauss_2tap_v.slang filter_linear2 = true scale_type2 = source -scale_x2 = 0.5 -scale_y2 = 0.5 +scale2 = 1.0 float_framebuffer2 = true wrap_mode2 = mirrored_repeat -shader3 = ../blurs/shaders/dual_filter/downsample.slang +shader3 = shaders/blur_fill/render_sampling_areas.slang filter_linear3 = true scale_type3 = source -scale_x3 = 0.5 -scale_y3 = 0.5 +scale_x3 = 2.0 +scale_y3 = 2.0 float_framebuffer3 = true -wrap_mode3 = mirrored_repeat +alias3 = "Tiled" shader4 = ../blurs/shaders/dual_filter/downsample.slang filter_linear4 = true scale_type4 = source -scale_x4 = 0.5 -scale_y4 = 0.5 +scale4 = 0.5 float_framebuffer4 = true wrap_mode4 = mirrored_repeat -shader5 = ../blurs/shaders/dual_filter/upsample.slang +shader5 = ../blurs/shaders/dual_filter/downsample.slang filter_linear5 = true scale_type5 = source -scale_x5 = 2.0 -scale_y5 = 2.0 +scale5 = 0.5 float_framebuffer5 = true wrap_mode5 = mirrored_repeat -shader6 = ../blurs/shaders/dual_filter/upsample.slang +shader6 = ../blurs/shaders/dual_filter/downsample.slang filter_linear6 = true scale_type6 = source -scale_x6 = 2.0 -scale_y6 = 2.0 +scale6 = 0.5 float_framebuffer6 = true wrap_mode6 = mirrored_repeat shader7 = ../blurs/shaders/dual_filter/upsample.slang filter_linear7 = true scale_type7 = source -scale_x7 = 2.0 -scale_y7 = 2.0 +scale7 = 2.0 float_framebuffer7 = true wrap_mode7 = mirrored_repeat -alias7 = "Blurred" -shader8 = shaders/blur_fill/compose.slang +shader8 = ../blurs/shaders/dual_filter/upsample.slang filter_linear8 = true -scale_type8 = viewport -scale_x8 = 1.0 -scale_y8 = 1.0 +scale_type8 = source +scale8 = 2.0 float_framebuffer8 = true -mipmap_input8 = true +wrap_mode8 = mirrored_repeat -shader9 = ../blurs/shaders/kawase/delinearize.slang +shader9 = ../blurs/shaders/dual_filter/upsample.slang filter_linear9 = true -scale_type9 = viewport -scale_x9 = 1.0 -scale_y9 = 1.0 +scale_type9 = source +scale9 = 2.0 float_framebuffer9 = true +wrap_mode9 = mirrored_repeat +alias9 = "Blurred" + +shader10 = shaders/blur_fill/compose.slang +filter_linear10 = true +scale_type10 = viewport +scale10 = 1.0 +float_framebuffer10 = true +mipmap_input10 = true + +shader11 = ../blurs/shaders/kawase/delinearize.slang +filter_linear11 = true +scale_type11 = viewport +scale11 = 1.0 +float_framebuffer11 = true diff --git a/border/blur_fill_stronger_blur.slangp b/border/blur_fill_stronger_blur.slangp index c9eb2b8..ed68c11 100644 --- a/border/blur_fill_stronger_blur.slangp +++ b/border/blur_fill_stronger_blur.slangp @@ -1,82 +1,89 @@ -shaders = 10 +shaders = 12 -parameters = "BLUR_RADIUS" -BLUR_RADIUS = 4.0 +parameters = "SIGMA;BLUR_RADIUS" +SIGMA = 2.0 +BLUR_RADIUS = 3.0 shader0 = ../blurs/shaders/kawase/linearize.slang scale_type0 = source -scale_x0 = 1.0 -scale_y0 = 1.0 +scale0 = 1.0 float_framebuffer0 = true alias0 = "Input" -shader1 = shaders/blur_fill/render_sampling_areas.slang -scale_type1 = viewport -scale_x1 = 0.1 -scale_y1 = 0.1 +shader1 = ../blurs/shaders/gauss_4tap/gauss_2tap_h.slang +filter_linear1 = true +scale_type1 = source +scale1 = 1.0 float_framebuffer1 = true -alias1 = "Tiled" +wrap_mode1 = mirrored_repeat -shader2 = ../blurs/shaders/dual_filter/downsample.slang +shader2 = ../blurs/shaders/gauss_4tap/gauss_2tap_v.slang filter_linear2 = true scale_type2 = source -scale_x2 = 0.5 -scale_y2 = 0.5 +scale2 = 1.0 float_framebuffer2 = true wrap_mode2 = mirrored_repeat -shader3 = ../blurs/shaders/dual_filter/downsample.slang +shader3 = shaders/blur_fill/render_sampling_areas.slang filter_linear3 = true scale_type3 = source -scale_x3 = 0.5 -scale_y3 = 0.5 +scale_x3 = 1.0 +scale_y3 = 1.0 float_framebuffer3 = true -wrap_mode3 = mirrored_repeat +alias3 = "Tiled" shader4 = ../blurs/shaders/dual_filter/downsample.slang filter_linear4 = true scale_type4 = source -scale_x4 = 0.5 -scale_y4 = 0.5 +scale4 = 0.5 float_framebuffer4 = true wrap_mode4 = mirrored_repeat -shader5 = ../blurs/shaders/dual_filter/upsample.slang +shader5 = ../blurs/shaders/dual_filter/downsample.slang filter_linear5 = true scale_type5 = source -scale_x5 = 2.0 -scale_y5 = 2.0 +scale5 = 0.5 float_framebuffer5 = true wrap_mode5 = mirrored_repeat -shader6 = ../blurs/shaders/dual_filter/upsample.slang +shader6 = ../blurs/shaders/dual_filter/downsample.slang filter_linear6 = true scale_type6 = source -scale_x6 = 2.0 -scale_y6 = 2.0 +scale6 = 0.5 float_framebuffer6 = true wrap_mode6 = mirrored_repeat shader7 = ../blurs/shaders/dual_filter/upsample.slang filter_linear7 = true scale_type7 = source -scale_x7 = 2.0 -scale_y7 = 2.0 +scale7 = 2.0 float_framebuffer7 = true wrap_mode7 = mirrored_repeat -alias7 = "Blurred" -shader8 = shaders/blur_fill/compose.slang +shader8 = ../blurs/shaders/dual_filter/upsample.slang filter_linear8 = true -scale_type8 = viewport -scale_x8 = 1.0 -scale_y8 = 1.0 +scale_type8 = source +scale8 = 2.0 float_framebuffer8 = true -mipmap_input8 = true +wrap_mode8 = mirrored_repeat -shader9 = ../blurs/shaders/kawase/delinearize.slang +shader9 = ../blurs/shaders/dual_filter/upsample.slang filter_linear9 = true -scale_type9 = viewport -scale_x9 = 1.0 -scale_y9 = 1.0 +scale_type9 = source +scale9 = 2.0 float_framebuffer9 = true +wrap_mode9 = mirrored_repeat +alias9 = "Blurred" + +shader10 = shaders/blur_fill/compose.slang +filter_linear10 = true +scale_type10 = viewport +scale10 = 1.0 +float_framebuffer10 = true +mipmap_input10 = true + +shader11 = ../blurs/shaders/kawase/delinearize.slang +filter_linear11 = true +scale_type11 = viewport +scale11 = 1.0 +float_framebuffer11 = true diff --git a/border/blur_fill_weaker_blur.slangp b/border/blur_fill_weaker_blur.slangp index 59eab3f..04fdd6c 100644 --- a/border/blur_fill_weaker_blur.slangp +++ b/border/blur_fill_weaker_blur.slangp @@ -1,82 +1,89 @@ -shaders = 10 +shaders = 12 -parameters = "BLUR_RADIUS" +parameters = "SIGMA;BLUR_RADIUS" +SIGMA = 1.0 BLUR_RADIUS = 1.0 shader0 = ../blurs/shaders/kawase/linearize.slang scale_type0 = source -scale_x0 = 1.0 -scale_y0 = 1.0 +scale0 = 1.0 float_framebuffer0 = true alias0 = "Input" -shader1 = shaders/blur_fill/render_sampling_areas.slang -scale_type1 = viewport -scale_x1 = 0.4 -scale_y1 = 0.4 +shader1 = ../blurs/shaders/gauss_4tap/gauss_2tap_h.slang +filter_linear1 = true +scale_type1 = source +scale1 = 1.0 float_framebuffer1 = true -alias1 = "Tiled" +wrap_mode1 = mirrored_repeat -shader2 = ../blurs/shaders/dual_filter/downsample.slang +shader2 = ../blurs/shaders/gauss_4tap/gauss_2tap_v.slang filter_linear2 = true scale_type2 = source -scale_x2 = 0.5 -scale_y2 = 0.5 +scale2 = 1.0 float_framebuffer2 = true wrap_mode2 = mirrored_repeat -shader3 = ../blurs/shaders/dual_filter/downsample.slang +shader3 = shaders/blur_fill/render_sampling_areas.slang filter_linear3 = true scale_type3 = source -scale_x3 = 0.5 -scale_y3 = 0.5 +scale_x3 = 3.0 +scale_y3 = 3.0 float_framebuffer3 = true -wrap_mode3 = mirrored_repeat +alias3 = "Tiled" shader4 = ../blurs/shaders/dual_filter/downsample.slang filter_linear4 = true scale_type4 = source -scale_x4 = 0.5 -scale_y4 = 0.5 +scale4 = 0.5 float_framebuffer4 = true wrap_mode4 = mirrored_repeat -shader5 = ../blurs/shaders/dual_filter/upsample.slang +shader5 = ../blurs/shaders/dual_filter/downsample.slang filter_linear5 = true scale_type5 = source -scale_x5 = 2.0 -scale_y5 = 2.0 +scale5 = 0.5 float_framebuffer5 = true wrap_mode5 = mirrored_repeat -shader6 = ../blurs/shaders/dual_filter/upsample.slang +shader6 = ../blurs/shaders/dual_filter/downsample.slang filter_linear6 = true scale_type6 = source -scale_x6 = 2.0 -scale_y6 = 2.0 +scale6 = 0.5 float_framebuffer6 = true wrap_mode6 = mirrored_repeat shader7 = ../blurs/shaders/dual_filter/upsample.slang filter_linear7 = true scale_type7 = source -scale_x7 = 2.0 -scale_y7 = 2.0 +scale7 = 2.0 float_framebuffer7 = true wrap_mode7 = mirrored_repeat -alias7 = "Blurred" -shader8 = shaders/blur_fill/compose.slang +shader8 = ../blurs/shaders/dual_filter/upsample.slang filter_linear8 = true -scale_type8 = viewport -scale_x8 = 1.0 -scale_y8 = 1.0 +scale_type8 = source +scale8 = 2.0 float_framebuffer8 = true -mipmap_input8 = true +wrap_mode8 = mirrored_repeat -shader9 = ../blurs/shaders/kawase/delinearize.slang +shader9 = ../blurs/shaders/dual_filter/upsample.slang filter_linear9 = true -scale_type9 = viewport -scale_x9 = 1.0 -scale_y9 = 1.0 +scale_type9 = source +scale9 = 2.0 float_framebuffer9 = true +wrap_mode9 = mirrored_repeat +alias9 = "Blurred" + +shader10 = shaders/blur_fill/compose.slang +filter_linear10 = true +scale_type10 = viewport +scale10 = 1.0 +float_framebuffer10 = true +mipmap_input10 = true + +shader11 = ../blurs/shaders/kawase/delinearize.slang +filter_linear11 = true +scale_type11 = viewport +scale11 = 1.0 +float_framebuffer11 = true diff --git a/border/shaders/average_fill/compose.slang b/border/shaders/average_fill/compose.slang index ceddf3f..bf0ec3c 100644 --- a/border/shaders/average_fill/compose.slang +++ b/border/shaders/average_fill/compose.slang @@ -1,7 +1,7 @@ #version 450 /* - Average fill v1.0 by fishku + Average fill v1.2 by fishku Copyright (C) 2023 Public domain license (CC0) diff --git a/border/shaders/blur_fill/compose.slang b/border/shaders/blur_fill/compose.slang index 494e38e..372008a 100644 --- a/border/shaders/blur_fill/compose.slang +++ b/border/shaders/blur_fill/compose.slang @@ -1,7 +1,7 @@ #version 450 /* - Blur fill v1.0 by fishku + Blur fill v1.3 by fishku Copyright (C) 2023 Public domain license (CC0) @@ -27,6 +27,7 @@ strength of the blur. Changelog: + v1.3: Reduce shimmering artifacts. v1.2: Fix scaling bugs. v1.1: Fix bug with glcore driver. v1.0: Initial release. diff --git a/border/shaders/blur_fill/parameters.slang b/border/shaders/blur_fill/parameters.slang index e6c9390..41ce08f 100644 --- a/border/shaders/blur_fill/parameters.slang +++ b/border/shaders/blur_fill/parameters.slang @@ -1,7 +1,7 @@ // See compose.slang for copyright and other information. // clang-format off -#pragma parameter BLUR_FILL_SETTINGS "=== Blur fill v1.2 settings ===" 0.0 0.0 1.0 1.0 +#pragma parameter BLUR_FILL_SETTINGS "=== Blur fill v1.3 settings ===" 0.0 0.0 1.0 1.0 #pragma parameter OS_CROP_TOP "Overscan crop top" 0.0 0.0 1024.0 1.0 #pragma parameter OS_CROP_BOTTOM "Overscan crop bottom" 0.0 0.0 1024.0 1.0 #pragma parameter OS_CROP_LEFT "Overscan crop left" 0.0 0.0 1024.0 1.0 diff --git a/border/shaders/blur_fill/render_sampling_areas.slang b/border/shaders/blur_fill/render_sampling_areas.slang index 6717116..0c351eb 100644 --- a/border/shaders/blur_fill/render_sampling_areas.slang +++ b/border/shaders/blur_fill/render_sampling_areas.slang @@ -41,7 +41,7 @@ void main() { #pragma stage fragment layout(location = 0) in vec2 vTexCoord; layout(location = 0) out vec4 FragColor; -layout(set = 0, binding = 2) uniform sampler2D Input; +layout(set = 0, binding = 2) uniform sampler2D Source; float min_of_vec4(vec4 i) { return min(min(i.x, i.y), min(i.z, i.w)); } @@ -218,7 +218,7 @@ vec3 sample_mirrored_frame(sampler2D tex, vec2 coord, vec4 input_extrema) { void main() { const vec2 pixel_coord = o2i(vTexCoord); FragColor = vec4( - sample_mirrored_frame(Input, pixel_coord, + sample_mirrored_frame(Source, pixel_coord, vec4(param.OS_CROP_LEFT, param.OS_CROP_TOP, param.InputSize.x - param.OS_CROP_RIGHT, param.InputSize.y - param.OS_CROP_BOTTOM)),