Sflp Shaders Better -

// sflp: stupid-fast lightweight fragment // dimensions: 640x360 | fps: 999+ | mem: 4 registers // license: unlicense | author: shader.elf precision mediump float; uniform vec2 resolution; uniform float time;

// cheap distance field float d = length(p) - 0.5; sflp shaders

// raw sinusoidal waves on axes vec2 q = p; q.x += sin(time * 1.7 + p.y * 8.0) * 0.1; q.y += cos(time * 1.3 + p.x * 7.0) * 0.1; uniform vec2 resolution

void main() // normalized pixel coord (-1..1) aspect corrected vec2 p = (gl_FragCoord.xy * 2.0 - resolution) / min(resolution.x, resolution.y); uniform float time

// boolean edge detection via fwidth (fast derivative) float edge = smoothstep(0.0, fwidth(d), abs(d));