// boolean edge detection via fwidth (fast derivative) float edge = smoothstep(0.0, fwidth(d), abs(d));
// color by position & time (no branching) vec3 col = mix(pink, cyan, sin(p.x * 3.14159 + time) * 0.5 + 0.5); col = mix(black, col, edge); sflp shaders
// SFLP rules: // 1. No texture fetches unless necessary. // 2. No loops longer than 8 iterations. // 3. No matrices — use signed distance fields. // 4. Branchless where possible. // 5. Fit in 80 columns, 32 lines. // 6. One uniform block max. // 7. Output must run on Mali-400 / Adreno 3xx. // 8. Flicker is a feature, not a bug. Example output description (if rendered) A pulsating neon mandala — pink and cyan concentric rings warped by low-frequency analog noise. Scanlines shimmer vertically. The center hole oscillates like a breathing iris. Total register pressure: 4. Estimated fill rate: 2.1 Gpixel/s on embedded GPU. No discard , no sqrt except for radius. // boolean edge detection via fwidth (fast derivative)
// 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; No loops longer than 8 iterations
gl_FragColor = vec4(col, 1.0); // sflp vertex: no camera, no matrix, just NDC quad attribute vec2 position; varying vec2 uv; void main() uv = position * 0.5 + 0.5; // (0..1) if position is -1..1 gl_Position = vec4(position, 0.0, 1.0);
void main() // normalized pixel coord (-1..1) aspect corrected vec2 p = (gl_FragCoord.xy * 2.0 - resolution) / min(resolution.x, resolution.y);
// 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;
// boolean edge detection via fwidth (fast derivative) float edge = smoothstep(0.0, fwidth(d), abs(d));
// color by position & time (no branching) vec3 col = mix(pink, cyan, sin(p.x * 3.14159 + time) * 0.5 + 0.5); col = mix(black, col, edge);
// SFLP rules: // 1. No texture fetches unless necessary. // 2. No loops longer than 8 iterations. // 3. No matrices — use signed distance fields. // 4. Branchless where possible. // 5. Fit in 80 columns, 32 lines. // 6. One uniform block max. // 7. Output must run on Mali-400 / Adreno 3xx. // 8. Flicker is a feature, not a bug. Example output description (if rendered) A pulsating neon mandala — pink and cyan concentric rings warped by low-frequency analog noise. Scanlines shimmer vertically. The center hole oscillates like a breathing iris. Total register pressure: 4. Estimated fill rate: 2.1 Gpixel/s on embedded GPU. No discard , no sqrt except for radius.
// 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;
gl_FragColor = vec4(col, 1.0); // sflp vertex: no camera, no matrix, just NDC quad attribute vec2 position; varying vec2 uv; void main() uv = position * 0.5 + 0.5; // (0..1) if position is -1..1 gl_Position = vec4(position, 0.0, 1.0);
void main() // normalized pixel coord (-1..1) aspect corrected vec2 p = (gl_FragCoord.xy * 2.0 - resolution) / min(resolution.x, resolution.y);
// 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;