[READ-ONLY] Mirror of https://github.com/probablykasper/ferrum. Music library app for Mac, Linux and Windows ferrum.kasper.space
electron linux macos music music-library music-player napi windows
0

Configure Feed

Select the types of activity you want to include in your feed.

Add Zippy Zaps visualiser

Kasper (Oct 2, 2025, 11:46 PM +0200) c1aafe52 d2975cd0

+38
+38
src/lib/visualizer/Visualizer.svelte
··· 144 144 } 145 145 `, 146 146 }, 147 + { 148 + name: 'Zippy Zaps', 149 + author: 'SnoopethDuckDuck', 150 + shader: ` 151 + #define PI 3.14159265359 152 + #define GLOW 0.5 153 + 154 + vec2 stanh(vec2 a) { 155 + return tanh(clamp(a, -40., 40.)); 156 + } 157 + 158 + void mainImage(out vec4 fragColor, in vec2 fragCoord) { 159 + vec2 v = iResolution.xy; 160 + vec2 u = 0.2 * (fragCoord.xy * 2. - v) / v.y; 161 + 162 + vec4 o = vec4(1, 2, 3, 0); 163 + vec4 col = vec4(0.0); 164 + 165 + for (float a = 0.5, t = iStream, i = 0.; i < 19.; i++) { 166 + v = cos(t + 1. - 7. * u * pow(a += 0.03, i)) - 5. * u; 167 + u += stanh(dot(u *= mat2(cos(i + 0.02 * t - vec4(0, 11, 33, 0))), u) 168 + * cos(1e2 * u.yx + t)) / 2e2 169 + + 0.2 * a * u 170 + + cos(4. / exp(dot(o, o) / 1e2) + t) / 3e2; 171 + t += 1.; 172 + col += (1. + cos(o + t)) / length((1. + i * dot(v, v)) * sin(1.5 * u / (0.5 - dot(u, u)) - 9. * u.yx + t)); 173 + } 174 + 175 + col = 25.6 / (min(col, 13.) + 164. / col) - dot(u, u) / 250.; 176 + 177 + // Apply glow based on iVolume 178 + col.rgb *= pow(iVolume + 0.1, GLOW); 179 + 180 + fragColor = vec4(col.rgb, 1.0); 181 + } 182 + 183 + `, 184 + }, 147 185 ] 148 186 149 187 const image_shader = `