This is a 2D cellular automaton with an update rule that makes it cycle. It’s seeded with random noise. Try turning the number of states up to 20 or more, making it really big and ticking the “Go fast?” box.
This is written using WebGL with the CCA update step calculated in a fragment shader. There are a pair of textures (at least as large as the canvas) that are alternated between, reading from one and writing to the other each frame, then swapping them.
This should work on most desktop GPUs. I wrote it on an Intel HD4600 GPU and got at least one person to try it with a GeForce and a Radeon card. It seems to work okay on my Android phone, too. :)
It’s working for me in Firefox and Chrome. It probably won’t work in MS Edge yet because they still haven’t marked their webgl implementation as being production-ready, as far as I know. I’d be slightly interested to hear if it works in other browsers like Safari and friends.
Currently open questions:
vec4s which are vectors of 4 floating point numbers in, I think, the range
GL_TEXTURE_RECTANGLEin WebGL, which would’ve made indexing easier instead of having to calculate
Currently known imperfections:
states + 1.0instead of by
quantize()function. I’m almost certain I’ve got that maths wrong.