This is an implementation of slime mold cellular automata.
Inspired by Sebastian Lague's and Leterax's implementations.
The code is written in Python where the ModernGL library is utilized for the GPU integration, ModernGL window is utilized for the window management, and pyimgui is used for GUI management.
The simulation is implemented in various shaders where the main logic of the slimes is written in /programs/compute.glsl
.
To run the application, make sure you have the aforementioned libraries installed, then:
- Clone or download this repository.
- Run
python3 main.py
Note that the GUI does not handle resolution changes. In case you want that, simply edit main.py
at line 10
and 11
.
The following are some images of the various types of slimes that can be made with this application:
The purpose of this project is to learn how to utilize compute shaders in an effective manner, and be able to use them in a rendering pipeline.
Thank you for your time :)