diff --git a/xbrz/shaders/xbrz-freescale-pass0.slang b/xbrz/shaders/xbrz-freescale-multipass/xbrz-freescale-pass0.slang similarity index 96% rename from xbrz/shaders/xbrz-freescale-pass0.slang rename to xbrz/shaders/xbrz-freescale-multipass/xbrz-freescale-pass0.slang index 0d0be64..6b2d048 100644 --- a/xbrz/shaders/xbrz-freescale-pass0.slang +++ b/xbrz/shaders/xbrz-freescale-multipass/xbrz-freescale-pass0.slang @@ -46,9 +46,20 @@ // * do so, delete this exception statement from your version. * // **************************************************************************** -#define BLEND_NONE 0 -#define BLEND_NORMAL 1 -#define BLEND_DOMINANT 2 +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OutputSize; + float blend_none, blend_normal, blend_dominant; +} params; + +#pragma parameter blend_none "Blend None" 0.0 0.0 2.0 1.0 +#pragma parameter blend_normal "Blend Normal" 1.0 0.0 2.0 1.0 +#pragma parameter blend_dominant "Blend Dominant" 2.0 0.0 2.0 1.0 + +#define BLEND_NONE int(params.blend_none) +#define BLEND_NORMAL int(params.blend_normal) +#define BLEND_DOMINANT int(params.blend_dominant) #define LUMINANCE_WEIGHT 1.0 #define EQUAL_COLOR_TOLERANCE 30.0/255.0 #define STEEP_DIRECTION_THRESHOLD 2.2 @@ -85,12 +96,6 @@ float get_left_ratio(vec2 center, vec2 origin, vec2 direction, vec2 scale) return smoothstep(-sqrt(2.0)/2.0, sqrt(2.0)/2.0, v); } -layout(push_constant) uniform Push -{ - vec4 SourceSize; - vec4 OutputSize; -} params; - layout(std140, set = 0, binding = 0) uniform UBO { mat4 MVP; diff --git a/xbrz/shaders/xbrz-freescale-pass1.slang b/xbrz/shaders/xbrz-freescale-multipass/xbrz-freescale-pass1.slang similarity index 95% rename from xbrz/shaders/xbrz-freescale-pass1.slang rename to xbrz/shaders/xbrz-freescale-multipass/xbrz-freescale-pass1.slang index 1666b80..d1c386a 100644 --- a/xbrz/shaders/xbrz-freescale-pass1.slang +++ b/xbrz/shaders/xbrz-freescale-multipass/xbrz-freescale-pass1.slang @@ -43,9 +43,20 @@ // * do so, delete this exception statement from your version. * // **************************************************************************** -#define BLEND_NONE 0 -#define BLEND_NORMAL 1 -#define BLEND_DOMINANT 2 +layout(push_constant) uniform Push +{ + vec4 xbrz_fs_refpassSize; + vec4 OutputSize; + float blend_none, blend_normal, blend_dominant; +} params; + +#pragma parameter blend_none "Blend None" 0.0 0.0 2.0 1.0 +#pragma parameter blend_normal "Blend Normal" 1.0 0.0 2.0 1.0 +#pragma parameter blend_dominant "Blend Dominant" 2.0 0.0 2.0 1.0 + +#define BLEND_NONE int(params.blend_none) +#define BLEND_NORMAL int(params.blend_normal) +#define BLEND_DOMINANT int(params.blend_dominant) #define LUMINANCE_WEIGHT 1.0 #define EQUAL_COLOR_TOLERANCE 30.0/255.0 #define STEEP_DIRECTION_THRESHOLD 2.2 @@ -82,12 +93,6 @@ float get_left_ratio(vec2 center, vec2 origin, vec2 direction, vec2 scale) return smoothstep(-sqrt(2.0)/2.0, sqrt(2.0)/2.0, v); } -layout(push_constant) uniform Push -{ - vec4 xbrz_fs_refpassSize; - vec4 OutputSize; -} params; - layout(std140, set = 0, binding = 0) uniform UBO { mat4 MVP; diff --git a/xbrz/shaders/xbrz-freescale.slang b/xbrz/shaders/xbrz-freescale.slang index 6d909c0..32e7c19 100644 --- a/xbrz/shaders/xbrz-freescale.slang +++ b/xbrz/shaders/xbrz-freescale.slang @@ -46,9 +46,20 @@ // * do so, delete this exception statement from your version. * // **************************************************************************** -#define BLEND_NONE 0 -#define BLEND_NORMAL 1 -#define BLEND_DOMINANT 2 +layout(push_constant) uniform Push +{ + vec4 SourceSize; + vec4 OutputSize; + float blend_none, blend_normal, blend_dominant; +} params; + +#pragma parameter blend_none "Blend None" 0.0 0.0 2.0 1.0 +#pragma parameter blend_normal "Blend Normal" 1.0 0.0 2.0 1.0 +#pragma parameter blend_dominant "Blend Dominant" 2.0 0.0 2.0 1.0 + +#define BLEND_NONE int(params.blend_none) +#define BLEND_NORMAL int(params.blend_normal) +#define BLEND_DOMINANT int(params.blend_dominant) #define LUMINANCE_WEIGHT 1.0 #define EQUAL_COLOR_TOLERANCE 30.0/255.0 #define STEEP_DIRECTION_THRESHOLD 2.2 @@ -85,12 +96,6 @@ float get_left_ratio(vec2 center, vec2 origin, vec2 direction, vec2 scale) return smoothstep(-sqrt(2.0)/2.0, sqrt(2.0)/2.0, v); } -layout(push_constant) uniform Push -{ - vec4 SourceSize; - vec4 OutputSize; -} params; - layout(std140, set = 0, binding = 0) uniform UBO { mat4 MVP; diff --git a/xbrz/xbrz-freescale-multipass.slangp b/xbrz/xbrz-freescale-multipass.slangp index 8a9e695..dd5c3d4 100644 --- a/xbrz/xbrz-freescale-multipass.slangp +++ b/xbrz/xbrz-freescale-multipass.slangp @@ -3,12 +3,12 @@ shaders = 3 shader0 = ../stock.slang alias0 = xbrz_fs_refpass -shader1 = shaders/xbrz-freescale-pass0.slang +shader1 = shaders/xbrz-freescale-multipass/xbrz-freescale-pass0.slang filter_linear1 = false scale_type1 = source scale1 = 1.0 -shader2 = shaders/xbrz-freescale-pass1.slang +shader2 = shaders/xbrz-freescale-multipass/xbrz-freescale-pass1.slang filter_linear2 = false scale_type2 = viewport scale2 = 1.0