Just a little experiment in using an OpenGL fragment shader to calculate the next generation in a game of life. Most of the work is done inside calculationShader.glsl
. main.lua
handles shuffling the textures around to the fragment shader.
View more screenshots and information here : abusing lovë2D pixel shaders.
space
- stop/start the simulationleft click
- bring alive the cell underneath the mouseleft click
+g
- spawn a glider underneath the mouseright click
- kill the cell underneath the mouses
- "single step" the simulation (calculate the next generation)up, down
- increase/decrease the simulation rater
- fill the screen with randomly alive or dead cellsc
- kill all the cellsh
- fill the entire screen with gliders (very fun to disturb)