Slime mould. The shortest set of rules in this chapter, and the one that most looks like it must be cheating.
Each particle has a position and a heading. It sniffs three points ahead of it, turns toward whichever smells strongest, steps forward, and leaves a smell of its own behind. The trails slowly spread out and fade.
That is all of it. Particles reinforce paths that other particles already took, and out of that comes a branching transport network that reorganises itself, prunes its own dead ends, and finds efficient routes. It is the same network the real organism grows in a petri dish, and famously the same one it found when researchers laid out food in the shape of Tokyo's rail stations.
The sensor angle is the main control. Narrow, and a particle only notices what is straight ahead, so the network runs tight and stringy. Wide, and it branches.
A picture can take part too. inputWeight draws the particles toward its bright areas and slows them down there. That picture is the pipeline image unless heightTex names another, and diffuseTex colours each particle from the surface beneath it.