diff --git a/handheld/ds-hybrid-scalefx.slangp b/handheld/ds-hybrid-scalefx.slangp index 5c19863..9ae1832 100644 --- a/handheld/ds-hybrid-scalefx.slangp +++ b/handheld/ds-hybrid-scalefx.slangp @@ -1,35 +1,40 @@ // This shader requires 16:9 aspect ratio // and integer scaling OFF -shaders = 6 +shaders = 7 -shader0 = ../scalefx/shaders/scalefx-pass0.slang -filter_linear0 = false -scale_type0 = source -scale0 = 1.0 -float_framebuffer0 = true +shader0 = ../stock.slang +alias0 = refpass +filter_linear0 = "false" -shader1 = ../scalefx/shaders/scalefx-pass1.slang +shader1 = ../scalefx/shaders/scalefx-pass0.slang filter_linear1 = false scale_type1 = source scale1 = 1.0 float_framebuffer1 = true +alias1 = scalefx_pass0 -shader2 = ../scalefx/shaders/scalefx-pass2.slang +shader2 = ../scalefx/shaders/scalefx-pass1.slang filter_linear2 = false scale_type2 = source scale2 = 1.0 +float_framebuffer2 = true -shader3 = ../scalefx/shaders/scalefx-pass3.slang +shader3 = ../scalefx/shaders/scalefx-pass2.slang filter_linear3 = false scale_type3 = source scale3 = 1.0 -shader4 = ../scalefx/shaders/scalefx-pass4.slang +shader4 = ../scalefx/shaders/scalefx-pass3.slang filter_linear4 = false scale_type4 = source -scale4 = 3.0 -alias4 = Ref +scale4 = 1.0 -shader5 = shaders/ds-hybrid-view.slang -filter_linear5 = true +shader5 = ../scalefx/shaders/scalefx-pass4.slang +filter_linear5 = false +scale_type5 = source +scale5 = 3.0 +alias5 = Ref + +shader6 = shaders/ds-hybrid-view.slang +filter_linear6 = true diff --git a/presets/xsoft+scalefx-level2aa+sharpsmoother.slangp b/presets/xsoft+scalefx-level2aa+sharpsmoother.slangp index 8a11824..bbd5633 100644 --- a/presets/xsoft+scalefx-level2aa+sharpsmoother.slangp +++ b/presets/xsoft+scalefx-level2aa+sharpsmoother.slangp @@ -4,12 +4,14 @@ shader0 = ../windowed/shaders/jinc2.slang filter_linear0 = false scale_type0 = source scale0 = 1.0 +alias0 = refpass shader1 = ../scalefx/shaders/scalefx-pass0.slang filter_linear1 = false scale_type1 = source scale1 = 1.0 float_framebuffer1 = true +alias1 = scalefx_pass0 shader2 = ../scalefx/shaders/scalefx-pass1.slang filter_linear2 = false @@ -57,4 +59,4 @@ JINC2_AR_STRENGTH = 0.30 JINC2_WINDOW_SINC = 0.55 JINC2_SINC = 0.95 SFX_SAA = 0.00 -SFX_CLR = 0.60 \ No newline at end of file +SFX_CLR = 0.60 diff --git a/presets/xsoft+scalefx-level2aa.slangp b/presets/xsoft+scalefx-level2aa.slangp index a248012..c00ffda 100644 --- a/presets/xsoft+scalefx-level2aa.slangp +++ b/presets/xsoft+scalefx-level2aa.slangp @@ -1,47 +1,51 @@ -shaders = 8 +shaders = 9 -shader0 = ../scalefx/shaders/scalefx-pass0.slang -filter_linear0 = false -scale_type0 = source -scale0 = 1.0 -float_framebuffer0 = true +shader0 = ../stock.slang +alias0 = refpass -shader1 = ../scalefx/shaders/scalefx-pass1.slang +shader1 = ../scalefx/shaders/scalefx-pass0.slang filter_linear1 = false scale_type1 = source scale1 = 1.0 float_framebuffer1 = true +alias1 = scalefx_pass0 -shader2 = ../scalefx/shaders/scalefx-pass2.slang +shader2 = ../scalefx/shaders/scalefx-pass1.slang filter_linear2 = false scale_type2 = source scale2 = 1.0 +float_framebuffer2 = true -shader3 = ../scalefx/shaders/scalefx-pass3.slang +shader3 = ../scalefx/shaders/scalefx-pass2.slang filter_linear3 = false scale_type3 = source scale3 = 1.0 -shader4 = ../scalefx/shaders/scalefx-pass4.slang +shader4 = ../scalefx/shaders/scalefx-pass3.slang filter_linear4 = false scale_type4 = source -scale4 = 3.0 +scale4 = 1.0 -shader5 = ../stock.slang +shader5 = ../scalefx/shaders/scalefx-pass4.slang filter_linear5 = false scale_type5 = source -scale5 = 2.0 +scale5 = 3.1 -shader6 = ../anti-aliasing/shaders/aa-shader-4.0-level2/aa-shader-4.0-level2-pass1.slang -filter_linear6 = true +shader6 = ../stock.slang +filter_linear6 = false scale_type6 = source -scale6 = 1.0 +scale6 = 2.0 -shader7 = ../anti-aliasing/shaders/aa-shader-4.0-level2/aa-shader-4.0-level2-pass2.slang +shader7 = ../anti-aliasing/shaders/aa-shader-4.0-level2/aa-shader-4.0-level2-pass1.slang filter_linear7 = true scale_type7 = source scale7 = 1.0 +shader8 = ../anti-aliasing/shaders/aa-shader-4.0-level2/aa-shader-4.0-level2-pass2.slang +filter_linear8 = true +scale_type8 = source +scale8 = 1.0 + parameters = "SFX_CLR;SFX_SAA" SFX_SAA = 0.00 -SFX_CLR = 0.60 \ No newline at end of file +SFX_CLR = 0.60 diff --git a/scalefx/scalefx+rAA.slangp b/scalefx/scalefx+rAA.slangp index e3d6758..28cf8e0 100644 --- a/scalefx/scalefx+rAA.slangp +++ b/scalefx/scalefx+rAA.slangp @@ -1,41 +1,46 @@ -shaders = 8 +shaders = 9 -shader0 = shaders/scalefx-pass0.slang -filter_linear0 = false -scale_type0 = source -scale0 = 1.0 -float_framebuffer0 = true +shader0 = ../stock.slang +alias0 = refpass +filter_linear0 = "false" -shader1 = shaders/scalefx-pass1.slang +shader1 = shaders/scalefx-pass0.slang filter_linear1 = false scale_type1 = source scale1 = 1.0 float_framebuffer1 = true +alias1 = scalefx_pass0 -shader2 = shaders/scalefx-pass2.slang +shader2 = shaders/scalefx-pass1.slang filter_linear2 = false scale_type2 = source scale2 = 1.0 +float_framebuffer2 = true -shader3 = shaders/scalefx-pass3.slang +shader3 = shaders/scalefx-pass2.slang filter_linear3 = false scale_type3 = source scale3 = 1.0 -shader4 = shaders/scalefx-pass4.slang +shader4 = shaders/scalefx-pass3.slang filter_linear4 = false scale_type4 = source -scale4 = 3.0 +scale4 = 1.0 -shader5 = ../anti-aliasing/shaders/reverse-aa-post3x/reverse-aa-post3x-pass0.slang +shader5 = shaders/scalefx-pass4.slang filter_linear5 = false scale_type5 = source -scale5 = 1.0 +scale5 = 3.0 -shader6 = ../anti-aliasing/shaders/reverse-aa-post3x/reverse-aa-post3x-pass1.slang +shader6 = ../anti-aliasing/shaders/reverse-aa-post3x/reverse-aa-post3x-pass0.slang filter_linear6 = false scale_type6 = source scale6 = 1.0 -shader7 = ../stock.slang -filter_linear7 = true +shader7 = ../anti-aliasing/shaders/reverse-aa-post3x/reverse-aa-post3x-pass1.slang +filter_linear7 = false +scale_type7 = source +scale7 = 1.0 + +shader8 = ../stock.slang +filter_linear8 = true diff --git a/scalefx/scalefx-hybrid.slangp b/scalefx/scalefx-hybrid.slangp index 9671b74..6cd9f2a 100644 --- a/scalefx/scalefx-hybrid.slangp +++ b/scalefx/scalefx-hybrid.slangp @@ -1,31 +1,36 @@ -shaders = 5 +shaders = 6 -shader0 = shaders/scalefx-pass0.slang -filter_linear0 = false -scale_type0 = source -scale0 = 1.0 -float_framebuffer0 = true +shader0 = ../stock.slang +alias0 = refpass +filter_linear0 = "false" -shader1 = shaders/scalefx-pass1.slang +shader1 = shaders/scalefx-pass0.slang filter_linear1 = false scale_type1 = source scale1 = 1.0 float_framebuffer1 = true +alias1 = scalefx_pass0 -shader2 = shaders/scalefx-pass2.slang +shader2 = shaders/scalefx-pass1.slang filter_linear2 = false scale_type2 = source scale2 = 1.0 +float_framebuffer2 = true -shader3 = shaders/scalefx-pass3.slang +shader3 = shaders/scalefx-pass2.slang filter_linear3 = false scale_type3 = source scale3 = 1.0 -shader4 = shaders/scalefx-pass4-hybrid.slang +shader4 = shaders/scalefx-pass3.slang filter_linear4 = false scale_type4 = source -scale4 = 3.0 +scale4 = 1.0 + +shader5 = shaders/scalefx-pass4-hybrid.slang +filter_linear5 = false +scale_type5 = source +scale5 = 3.0 parameters = "SFX_SAA" SFX_SAA = "0.0" diff --git a/scalefx/scalefx.slangp b/scalefx/scalefx.slangp index 2ad8112..262f4fc 100644 --- a/scalefx/scalefx.slangp +++ b/scalefx/scalefx.slangp @@ -1,28 +1,33 @@ -shaders = 5 +shaders = 6 -shader0 = shaders/scalefx-pass0.slang -filter_linear0 = false -scale_type0 = source -scale0 = 1.0 -float_framebuffer0 = true +shader0 = ../stock.slang +alias0 = refpass +filter_linear0 = "false" -shader1 = shaders/scalefx-pass1.slang +shader1 = shaders/scalefx-pass0.slang filter_linear1 = false scale_type1 = source scale1 = 1.0 float_framebuffer1 = true +alias1 = scalefx_pass0 -shader2 = shaders/scalefx-pass2.slang +shader2 = shaders/scalefx-pass1.slang filter_linear2 = false scale_type2 = source scale2 = 1.0 +float_framebuffer2 = true -shader3 = shaders/scalefx-pass3.slang +shader3 = shaders/scalefx-pass2.slang filter_linear3 = false scale_type3 = source scale3 = 1.0 -shader4 = shaders/scalefx-pass4.slang +shader4 = shaders/scalefx-pass3.slang filter_linear4 = false scale_type4 = source -scale4 = 3.0 +scale4 = 1.0 + +shader5 = shaders/scalefx-pass4.slang +filter_linear5 = false +scale_type5 = source +scale5 = 3.0 diff --git a/scalefx/shaders/scalefx-pass2.slang b/scalefx/shaders/scalefx-pass2.slang index d8dbbbd..dd53d25 100644 --- a/scalefx/shaders/scalefx-pass2.slang +++ b/scalefx/shaders/scalefx-pass2.slang @@ -60,7 +60,7 @@ layout(location = 0) out vec2 vTexCoord; void main() { gl_Position = global.MVP * Position; - vTexCoord = TexCoord; + vTexCoord = TexCoord*1.0001;; } @@ -68,7 +68,7 @@ void main() layout(location = 0) in vec2 vTexCoord; layout(location = 0) out vec4 FragColor; layout(binding = 1) uniform sampler2D Source; -layout(binding = 2) uniform sampler2D PassOutput0; +layout(binding = 2) uniform sampler2D scalefx_pass0; #define LE(x, y) (1 - step(y, x)) @@ -99,7 +99,7 @@ void main() */ -#define TEXm(x, y) textureOffset(PassOutput0, vTexCoord, ivec2(x, y)) +#define TEXm(x, y) textureOffset(scalefx_pass0, vTexCoord, ivec2(x, y)) #define TEXs(x, y) textureOffset(Source, vTexCoord, ivec2(x, y)) diff --git a/scalefx/shaders/scalefx-pass4-hybrid.slang b/scalefx/shaders/scalefx-pass4-hybrid.slang index 9867a4d..d8c80da 100644 --- a/scalefx/shaders/scalefx-pass4-hybrid.slang +++ b/scalefx/shaders/scalefx-pass4-hybrid.slang @@ -73,7 +73,7 @@ void main() layout(location = 0) in vec2 vTexCoord; layout(location = 0) out vec4 FragColor; layout(binding = 1) uniform sampler2D Source; -layout(binding = 2) uniform sampler2D Original; +layout(binding = 2) uniform sampler2D refpass; // extract corners @@ -131,7 +131,7 @@ void main() vec3 res = fp.y == 0 ? (fp.x == 0 ? vec3(crn.x, hc.y, vc.w) : fp.x == 1 ? vec3(mid.x, 0, vm.z) : vec3(crn.y, hc.x, vc.z)) : (fp.y == 1 ? (fp.x == 0 ? vec3(mid.w, hm.y, 0) : fp.x == 1 ? vec3(0) : vec3(mid.y, hm.w, 0)) : (fp.x == 0 ? vec3(crn.w, hc.z, vc.x) : fp.x == 1 ? vec3(mid.z, 0, vm.x) : vec3(crn.z, hc.w, vc.y))); -#define TEX(x, y) textureOffset(Original, vTexCoord, ivec2(x, y)).rgb +#define TEX(x, y) textureOffset(refpass, vTexCoord, ivec2(x, y)).rgb // reverseAA vec3 E0 = TEX( 0, 0); @@ -156,4 +156,4 @@ void main() // hybrid output FragColor = vec4((res.x != 0) ? sfx : raa, 0); -} \ No newline at end of file +} diff --git a/scalefx/shaders/scalefx-pass4.slang b/scalefx/shaders/scalefx-pass4.slang index 630e0df..f69329e 100644 --- a/scalefx/shaders/scalefx-pass4.slang +++ b/scalefx/shaders/scalefx-pass4.slang @@ -70,7 +70,7 @@ void main() layout(location = 0) in vec2 vTexCoord; layout(location = 0) out vec4 FragColor; layout(binding = 1) uniform sampler2D Source; -layout(binding = 2) uniform sampler2D Original; +layout(binding = 2) uniform sampler2D refpass; // extract corners @@ -110,5 +110,5 @@ void main() vec2 res = sp == 0 ? vec2(0,0) : sp == 1 ? vec2(-1,0) : sp == 2 ? vec2(-2,0) : sp == 3 ? vec2(1,0) : sp == 4 ? vec2(2,0) : sp == 5 ? vec2(0,-1) : sp == 6 ? vec2(0,-2) : sp == 7 ? vec2(0,1) : vec2(0,2); // ouput - FragColor = texture(Original, vTexCoord + res / params.SourceSize.xy); + FragColor = texture(refpass, vTexCoord + res / params.SourceSize.xy); }