https://github.com/loipesmas/rust-compute-shaders
OpenGL compute shaders in rust using glow
https://github.com/loipesmas/rust-compute-shaders
glow glsl opengl rust rust-lang shaders
Last synced: 27 days ago
JSON representation
OpenGL compute shaders in rust using glow
- Host: GitHub
- URL: https://github.com/loipesmas/rust-compute-shaders
- Owner: LoipesMas
- Created: 2021-12-26T00:30:07.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-29T21:14:23.000Z (almost 4 years ago)
- Last Synced: 2025-07-15T20:14:48.500Z (3 months ago)
- Topics: glow, glsl, opengl, rust, rust-lang, shaders
- Language: Rust
- Homepage:
- Size: 117 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Just some fun with compute shaders
Used `glow` for opengl context, `glutin` for window creation, `imgui` for ui.
### Game of Life
[Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) with compute shaders allows for pretty big grids (i.e. 4096x4096).
`cargo run --bin gol --release`
### Boids
[Boids](https://en.wikipedia.org/wiki/Boids) simulation. Again, doing it on GPU allows for a larger number of agents.
It lacks some optimizations and collision avoidance is kinda clunky, but still handles a thousand of agents.
`cargo run --bin boid --release`https://user-images.githubusercontent.com/46327403/147675185-8cbfe4c9-485d-410a-b69d-499e95dd08c4.mp4
### Mold
Mold simulation, inspired by [this video](https://www.youtube.com/watch?v=X-iSQQgOd1A), which was based on [this paper](https://uwe-repository.worktribe.com/output/980579).
Can handle a million of agents (depending on texture size and sensor size).
`cargo run --bin mold --release`
https://user-images.githubusercontent.com/46327403/147675343-94d6823d-75d7-47a0-8eda-513746fdf7fc.mp4
#### Hopefully more to come??
(I want to try fluid simulation)