From 75a722544600c85b79064ff49a0592ebabe4b1b7 Mon Sep 17 00:00:00 2001 From: redaphid Date: Mon, 11 Mar 2024 21:17:10 -0700 Subject: [PATCH 1/3] add new shader under my username --- shaders/redaphid/2.frag | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 shaders/redaphid/2.frag diff --git a/shaders/redaphid/2.frag b/shaders/redaphid/2.frag new file mode 100644 index 0000000..ea0ddbb --- /dev/null +++ b/shaders/redaphid/2.frag @@ -0,0 +1,40 @@ +/* +by Dom Mandy in 2024 +*/ +uniform float knob_1; +uniform float knob_2; +uniform float knob_3; + +// 1.24 to 8.73 +#define A max(mapValue(spectralCentroid, 0., 1., 0.74,11.33),0.01) +// 0.05 to 0.2 +#define B mapValue(spectralRoughnessZScore, -1.,1.,0.05,0.2) + +// -0.92 to -0.22 +#define D mapValue(spectralFlux, 0., 1., -0.92,-.22) +// .23 2. +void mainImage(out vec4 P, vec2 V) { + vec2 Z = iResolution.xy, + C = .6 * (Z - V - V).yx / Z.y; + C.x += .77; + V = C*D; + + float v, x, y, + z = y = x = 9.; + + for (int k; k < 50; k++) { + float a = atan(V.y, V.x), + d = dot(V, V) * A; + float c = dot(V, vec2(a, log(d) / 2.)); + V = exp(-a * V.y) * pow(d, V.x / 2.) * vec2(cos(c), sin(c)); + V = vec2(V.x * V.x - V.y * V.y, dot(V, V.yx)); + V -= C * B; + + x = min(x, abs(V.x)); + y = min(y, abs(V.y)); + z > (v = dot(V, V)) ? z = v, Z = V : Z; + } + + z = 1. - smoothstep(1., -6., log(y)) * smoothstep(1., -6., log(x)); + P = sqrt(z + (z - z * z * z) * cos(atan(Z.y, Z.x) - vec4(0, 2.1, 4.2, 0))); +} From 45281458364113df22ed6794ddf79724bdbbb293 Mon Sep 17 00:00:00 2001 From: redaphid Date: Mon, 11 Mar 2024 21:18:19 -0700 Subject: [PATCH 2/3] try to remove my shaders, and add a rogue one --- shaders/{redaphid/2.frag => 3.frag} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename shaders/{redaphid/2.frag => 3.frag} (100%) diff --git a/shaders/redaphid/2.frag b/shaders/3.frag similarity index 100% rename from shaders/redaphid/2.frag rename to shaders/3.frag From c9853fa446474676c7a40ff86b5d96512cd03815 Mon Sep 17 00:00:00 2001 From: redaphid Date: Mon, 11 Mar 2024 21:19:20 -0700 Subject: [PATCH 3/3] remove the rogue shader; I expect this to remove everything in my home dir --- shaders/3.frag | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 shaders/3.frag diff --git a/shaders/3.frag b/shaders/3.frag deleted file mode 100644 index ea0ddbb..0000000 --- a/shaders/3.frag +++ /dev/null @@ -1,40 +0,0 @@ -/* -by Dom Mandy in 2024 -*/ -uniform float knob_1; -uniform float knob_2; -uniform float knob_3; - -// 1.24 to 8.73 -#define A max(mapValue(spectralCentroid, 0., 1., 0.74,11.33),0.01) -// 0.05 to 0.2 -#define B mapValue(spectralRoughnessZScore, -1.,1.,0.05,0.2) - -// -0.92 to -0.22 -#define D mapValue(spectralFlux, 0., 1., -0.92,-.22) -// .23 2. -void mainImage(out vec4 P, vec2 V) { - vec2 Z = iResolution.xy, - C = .6 * (Z - V - V).yx / Z.y; - C.x += .77; - V = C*D; - - float v, x, y, - z = y = x = 9.; - - for (int k; k < 50; k++) { - float a = atan(V.y, V.x), - d = dot(V, V) * A; - float c = dot(V, vec2(a, log(d) / 2.)); - V = exp(-a * V.y) * pow(d, V.x / 2.) * vec2(cos(c), sin(c)); - V = vec2(V.x * V.x - V.y * V.y, dot(V, V.yx)); - V -= C * B; - - x = min(x, abs(V.x)); - y = min(y, abs(V.y)); - z > (v = dot(V, V)) ? z = v, Z = V : Z; - } - - z = 1. - smoothstep(1., -6., log(y)) * smoothstep(1., -6., log(x)); - P = sqrt(z + (z - z * z * z) * cos(atan(Z.y, Z.x) - vec4(0, 2.1, 4.2, 0))); -}