A GPU slime-mold simulation, in your browser. Hundreds of thousands of agents leave trails, sense them, and self-organize into living, branching networks that flow toward your cursor. WebGL2 GPGPU, no server, no dependencies, no build step.
→ Live: https://mycelia.agentpostmortem.com
A Physarum (slime mold) simulation. Each of ~262,000 agents senses the trail field ahead, ahead-left, and ahead-right, steers toward the strongest, moves forward, and deposits a little trail of its own. The trail diffuses and decays. From those three local rules, emergent transport networks appear that look uncannily alive.
- Update agents. A fragment shader reads each agent's state (position, heading) and the trail, senses three directions, steers, moves, and wraps. Agent state lives in a floating-point texture (ping-ponged A/B).
- Deposit. One GL point per agent, additively blended into the trail map.
- Diffuse + decay. A 3×3 blur times a decay factor, ping-ponged.
- Render. Trail intensity is mapped through an Inigo Quilez cosine palette to the screen.
All state lives in GPU textures — there is no CPU in the loop. This is agent-based GPU compute done the WebGL2 way (fragment-shader GPGPU), so it runs anywhere WebGL2 does, and it costs nothing to host because the work happens on the visitor's GPU.
- Palette — Spore / Ice / Ember / Bloom
- Behaviour — Weave / Coral / Storm (different sensor geometry produces different network patterns)
- Reset, and Save PNG to grab any frame as a wallpaper
Open public/index.html in a browser, or serve the folder:
npx serve publicMIT