This project is a combination of a very vast implementation of conway's game of life on the gpu and an interactive 3d visualization of the simulation (the visualization is often much slower, running at 30fps instead of 300).
To simulate life, we use texture lookups. This lets us run all cells in parallel, given that we have a texture of the exact same pixel size as our drawn polygon in screen space. An easy way to do this is to use a framebuffer of a given size, make a texture of the exact same size, and draw a fullscreen quad on the framebuffer. A custom shader then calculates the next stage of the simulation from texture calls and draws it to the framebuffer. The resultant texture can then be used for anything (paritcularly visualization or the next stage of simulation).
The visualization here is drawing a cube for every cell, dead or alive, in the simulation (this means that, in general, upwards of two million cubes are drawn). A good framerate is maintained by using VBOs and glDrawInstanced. The instance ID is used to look up the texture coordinate (1D id mapped to 2D texture) and determine the final position of the vertices in the cube. For each simulated frame, cells that are alive dim in the original texture (color = color*0.01, clamped to .1). This allows future shaders to know how long alive cells have been alive. The visualization both lightens the models as they're alive longer, and makes them rise in space.
Additionally, the visualization can be shown with real time edge detection turned on. This is a post-process shader that simply computes the sobel convolution and draws that to the screen.
Next time I'll make a video.