A WebGPU-based falling sand simulation written in Rust.
This project implements a falling sand simulation using WebGPU for GPU-accelerated rendering and computation. The simulation allows particles to interact with each without race conditions by using block cellular automata technique (wiki).
- Real-time particle simulation
- GPU-accelerated rendering using WebGPU
- Interactive simulation controls
- Block cellular automata technique
- Rust (latest stable version)
- WebGPU-compatible browser or environment
cargo runThis will start the simulation application.
src/main.rs- Main application entry pointsrc/shader.wgsl- WebGPU shaders for renderingsrc/compute.wgsl- Compute shaders for particle simulationsrc/blit.wgsl- Shader for texture blitting operations
- Mouse click: Add particles
This project is licensed under the MIT License.