#https://www.shadertoy.com/view/4sK3Ww

pixels = W:2048 H:1024

x = from 0 to 1 W
y = from 4 to 0 H

n = 3
r = 0.5 - 0.5*cos(fract(y)*PI)
s = pow(n, floor(y))
w = fract(x*s) - 0.5

xx = w*n/r + n/2
ss = n*s/r/400

a = if( abs(w/r) > 0.5, xx, fract(xx) )
k = min(1, abs(a  - 0.5)/ss)

r = k
g = k
b = k
