diff --git a/nedi/shaders/nedi-jinc.slang b/nedi/shaders/nedi-jinc.slang index 7b0b0f5..4d7122c 100644 --- a/nedi/shaders/nedi-jinc.slang +++ b/nedi/shaders/nedi-jinc.slang @@ -112,7 +112,10 @@ float3 max4(float3 a, float3 b, float3 c, float3 d) { float4 res; - res = (x==float4(0.0, 0.0, 0.0, 0.0)) ? float4(wa*wb) : sin(x*wa)*sin(x*wb)/(x*x); + res.x = (x.x==0.0) ? (wa*wb) : sin(x.x*wa)*sin(x.x*wb)/(x.x*x.x); + res.y = (x.y==0.0) ? (wa*wb) : sin(x.y*wa)*sin(x.y*wb)/(x.y*x.y); + res.z = (x.z==0.0) ? (wa*wb) : sin(x.z*wa)*sin(x.z*wb)/(x.z*x.z); + res.w = (x.w==0.0) ? (wa*wb) : sin(x.w*wa)*sin(x.w*wb)/(x.w*x.w); return res; } diff --git a/nnedi3/shaders/jinc2-cshift-luma.slang b/nnedi3/shaders/jinc2-cshift-luma.slang index 697bb76..da60e3e 100644 --- a/nnedi3/shaders/jinc2-cshift-luma.slang +++ b/nnedi3/shaders/jinc2-cshift-luma.slang @@ -79,7 +79,12 @@ float max4(float a, float b, float c, float d) vec4 resampler(vec4 x) { vec4 res; - res = (x==vec4(0.0, 0.0, 0.0, 0.0)) ? vec4(wa*wb) : sin(x*wa)*sin(x*wb)/(x*x); + + res.x = (x.x==0.0) ? (wa*wb) : sin(x.x*wa)*sin(x.x*wb)/(x.x*x.x); + res.y = (x.y==0.0) ? (wa*wb) : sin(x.y*wa)*sin(x.y*wb)/(x.y*x.y); + res.z = (x.z==0.0) ? (wa*wb) : sin(x.z*wa)*sin(x.z*wb)/(x.z*x.z); + res.w = (x.w==0.0) ? (wa*wb) : sin(x.w*wa)*sin(x.w*wb)/(x.w*x.w); + return res; } diff --git a/nnedi3/shaders/jinc2-cshift-rgb.slang b/nnedi3/shaders/jinc2-cshift-rgb.slang index f531a21..625d8a9 100644 --- a/nnedi3/shaders/jinc2-cshift-rgb.slang +++ b/nnedi3/shaders/jinc2-cshift-rgb.slang @@ -79,7 +79,12 @@ vec3 max4(vec3 a, vec3 b, vec3 c, vec3 d) vec4 resampler(vec4 x) { vec4 res; - res = (x==vec4(0.0, 0.0, 0.0, 0.0)) ? vec4(wa*wb) : sin(x*wa)*sin(x*wb)/(x*x); + + res.x = (x.x==0.0) ? (wa*wb) : sin(x.x*wa)*sin(x.x*wb)/(x.x*x.x); + res.y = (x.y==0.0) ? (wa*wb) : sin(x.y*wa)*sin(x.y*wb)/(x.y*x.y); + res.z = (x.z==0.0) ? (wa*wb) : sin(x.z*wa)*sin(x.z*wb)/(x.z*x.z); + res.w = (x.w==0.0) ? (wa*wb) : sin(x.w*wa)*sin(x.w*wb)/(x.w*x.w); + return res; } diff --git a/nnedi3/shaders/jinc2-on-passoutput0.slang b/nnedi3/shaders/jinc2-on-passoutput0.slang index 79592bf..e898431 100644 --- a/nnedi3/shaders/jinc2-on-passoutput0.slang +++ b/nnedi3/shaders/jinc2-on-passoutput0.slang @@ -79,7 +79,12 @@ vec3 max4(vec3 a, vec3 b, vec3 c, vec3 d) vec4 resampler(vec4 x) { vec4 res; - res = (x==vec4(0.0, 0.0, 0.0, 0.0)) ? vec4(wa*wb) : sin(x*wa)*sin(x*wb)/(x*x); + + res.x = (x.x==0.0) ? (wa*wb) : sin(x.x*wa)*sin(x.x*wb)/(x.x*x.x); + res.y = (x.y==0.0) ? (wa*wb) : sin(x.y*wa)*sin(x.y*wb)/(x.y*x.y); + res.z = (x.z==0.0) ? (wa*wb) : sin(x.z*wa)*sin(x.z*wb)/(x.z*x.z); + res.w = (x.w==0.0) ? (wa*wb) : sin(x.w*wa)*sin(x.w*wb)/(x.w*x.w); + return res; } diff --git a/nnedi3/shaders/jinc2-on-passoutput3.slang b/nnedi3/shaders/jinc2-on-passoutput3.slang index 9eeca6b..261497d 100644 --- a/nnedi3/shaders/jinc2-on-passoutput3.slang +++ b/nnedi3/shaders/jinc2-on-passoutput3.slang @@ -79,7 +79,12 @@ vec3 max4(vec3 a, vec3 b, vec3 c, vec3 d) vec4 resampler(vec4 x) { vec4 res; - res = (x==vec4(0.0, 0.0, 0.0, 0.0)) ? vec4(wa*wb) : sin(x*wa)*sin(x*wb)/(x*x); + + res.x = (x.x==0.0) ? (wa*wb) : sin(x.x*wa)*sin(x.x*wb)/(x.x*x.x); + res.y = (x.y==0.0) ? (wa*wb) : sin(x.y*wa)*sin(x.y*wb)/(x.y*x.y); + res.z = (x.z==0.0) ? (wa*wb) : sin(x.z*wa)*sin(x.z*wb)/(x.z*x.z); + res.w = (x.w==0.0) ? (wa*wb) : sin(x.w*wa)*sin(x.w*wb)/(x.w*x.w); + return res; } diff --git a/windowed/shaders/lanczos16.slang b/windowed/shaders/lanczos16.slang index a30c6cd..7320452 100644 --- a/windowed/shaders/lanczos16.slang +++ b/windowed/shaders/lanczos16.slang @@ -40,7 +40,10 @@ vec4 l(vec4 x) { vec4 res; - res = (x==vec4(0.0, 0.0, 0.0, 0.0)) ? vec4(pi*floatpi) : sin(x*floatpi)*sin(x*pi)/(x*x); + res.x = (x.x==0.0) ? (pi*floatpi) : sin(x.x*floatpi)*sin(x.x*pi)/(x.x*x.x); + res.y = (x.y==0.0) ? (pi*floatpi) : sin(x.y*floatpi)*sin(x.y*pi)/(x.y*x.y); + res.z = (x.z==0.0) ? (pi*floatpi) : sin(x.z*floatpi)*sin(x.z*pi)/(x.z*x.z); + res.w = (x.w==0.0) ? (pi*floatpi) : sin(x.w*floatpi)*sin(x.w*pi)/(x.w*x.w); return res; } diff --git a/xbr/shaders/super-xbr/custom-jinc2-sharper.slang b/xbr/shaders/super-xbr/custom-jinc2-sharper.slang index c3c5b38..218b42b 100644 --- a/xbr/shaders/super-xbr/custom-jinc2-sharper.slang +++ b/xbr/shaders/super-xbr/custom-jinc2-sharper.slang @@ -84,7 +84,12 @@ vec3 max4(vec3 a, vec3 b, vec3 c, vec3 d) vec4 resampler(vec4 x) { vec4 res; - res = (x == vec4(0.0, 0.0, 0.0, 0.0)) ? vec4(wa*wb) : sin(x*wa)*sin(x*wb)/(x*x); + + res.x = (x.x==0.0) ? (wa*wb) : sin(x.x*wa)*sin(x.x*wb)/(x.x*x.x); + res.y = (x.y==0.0) ? (wa*wb) : sin(x.y*wa)*sin(x.y*wb)/(x.y*x.y); + res.z = (x.z==0.0) ? (wa*wb) : sin(x.z*wa)*sin(x.z*wb)/(x.z*x.z); + res.w = (x.w==0.0) ? (wa*wb) : sin(x.w*wa)*sin(x.w*wb)/(x.w*x.w); + return res; }