Skip to content

JekiXD/water-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Water simulation using particles written with WebGPU

To start the program, run the following commands in the main directory:

cargo build --all
cargo run

If simulation is lagging, you can try decreasing the amount of particles in settings.rs file. Or you can try decreasing the size of a grid used for neighbour search(grid_size). If you want to do the latter, then there are 2 options:

  • You can change it with a menu after launching the program. In this case, if you decrease the size of the grid, you will see artifacts, mainly the grid itself. This happens due to radius of kernels being bigger than the grid. You can then change kernel's sizes accordingly
  • Or change it in settings.rs file to preserve kernel's sizes to be equal to grid size.

Beware, that changing kernel's radiuses is going to destabilize the system. You'll have to play with values(the main ones are "Rest density" and "Near/Pressure multiplier") to find a new balance.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published