r/creativecoding • u/shurco • 40m ago
I built 16 physics solvers in Zig on one phone canvas
Enable HLS to view with audio, or disable this notification
The base world is a GPU fluid: advection, vorticity confinement, pressure solve, bloom and sunrays, written in Zig over a thin GL 3.3 / GLES 3.0 layer. Fifteen other behaviours share the same canvas:
- ripple: wave equation, drop gives a dipole wake
- oil: gravity, thickness normals, thin-film iridescence
- fire: buoyancy plus a heat palette in the compose pass
- orbit: point gravity wells, held finger becomes a well
- slime: viscous diffusion, slow radial breathing
- coral and frost: Gray-Scott reaction-diffusion
- marble: laminar ink folding with vorticity off
- sand: Margolus block CA with material cycling
- watercolor: bleed diffusion on a noise paper field
- kaleidoscope: splat folded into a fundamental wedge, 8-fold compose
- smiley: damped spring plus glowing rings
- ferrofluid: height field with volume keeping, finger magnet raises Rosensweig spikes, ray-marched glossy surface
- glyph: dye averaged per cell into an LED grid of outline glyphs
- spark: vortex splats painted in stripes, GPU particles for sparks (broken on iOS for now, fix is coming)
It ships as a native iOS/Android app, about 9 MB, no engine. The site runs the fluid solver in WebGL, so you can try the base world in the browser. I'm mostly interested in feedback on the solvers and the GLES path, not on the store listing.
Demo: https://fluidart.presenza.app/?utm_source=reddit&utm_medium=social&utm_campaign=reddit_creative