Sflp Shaders May 2026
// boolean edge detection via fwidth (fast derivative) float edge = smoothstep(0.0, fwidth(d), abs(d));
// cheap distance field float d = length(p) - 0.5; 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)
// scanline grit (fake low-res) col *= 0.9 + 0.2 * sin(gl_FragCoord.y * 2.0); No loops longer than 8 iterations
// 3-tone palette: black / hot pink / cyan vec3 black = vec3(0.0); vec3 pink = vec3(1.0, 0.2, 0.8); vec3 cyan = vec3(0.2, 0.9, 1.0);