Skip to content

PurpleToti/FallingSandSimulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Falling Sand Simulation

A WebGPU-based falling sand simulation written in Rust.

Overview

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).

Features

  • Real-time particle simulation
  • GPU-accelerated rendering using WebGPU
  • Interactive simulation controls
  • Block cellular automata technique

Getting Started

Prerequisites

  • Rust (latest stable version)
  • WebGPU-compatible browser or environment

Building and Running

cargo run

This will start the simulation application.

Project Structure

  • src/main.rs - Main application entry point
  • src/shader.wgsl - WebGPU shaders for rendering
  • src/compute.wgsl - Compute shaders for particle simulation
  • src/blit.wgsl - Shader for texture blitting operations

Controls

  • Mouse click: Add particles

Useful Links

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors