Home

Awesome

regl-smooth-life

SmoothLife on the GPU, via regl

Leaving this repo for reference, but see updated version at: http://rreusser.github.io/demos/smooth-life/

A quick implementation of SmoothLife on the GPU using regl. GPGPU has never been so easy. As far as WebGL goes, this is little more than a trivial modification of Mikola's Game of Life example.

It's pretty inefficient since it's brute-forcing the convolution. It's unrolling the loop as intelligently as possible (I suspect the compiler is probably good enough to remove all precalculatable floating point multiplications and loop branches anyway), but I really need to figure out GPU FFT. It might actually be faster to do this in plain js, but it was a great REGL learning experience (though admittedly most of the time was just spent tweaking the parameters trying to get anything interesting. I guess it was mostly just fun is what I'm trying to say).

See demo at: http://rreusser.github.io/regl-smooth-life

But for a better implementation, see: smoothnacl from the PNaCl Demos site.

References

Rafler, Stephan (2011). "Generalization of Conway's "Game of Life" to a continuous domain - SmoothLife". arXiv:1111.1567v2.

License

© 2016 Ricky Reusser. MIT License.