mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-26 09:21:30 +11:00
Merge pull request #345 from hunterk/master
add parameters to xbrz-freescale and put multipass into a subdirectory
This commit is contained in:
commit
67bcc56117
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue