slosh2d

Crates.ioslosh2d
lib.rsslosh2d
version0.1.0
created_at2025-09-20 14:56:09.127784+00
updated_at2025-09-20 14:56:09.127784+00
descriptionCross-platform GPU 2D Material Point Method implementation.
homepage
repositoryhttps://github.com/dimforge/stensor
max_upload_size
id1847841
size6,938,295
MACs (github:rustcrypto:macs)

documentation

README

Slosh: cross-platform MPM GPU physics simulation

crates.io

Running the examples

  1. Download the Slang compiler libraries for your platform: https://github.com/shader-slang/slang/releases/tag/v2025.16
  2. Unzip the downloaded directory, and use its path as value to the SLANG_DIR environment variable: SLANG_DIR=/path/to/slang. Note that the variable must point to the root of the slang installation (i.e. the directory that contains bin and lib).
  3. For the 2D examples, run cargo run --release --example testbed2
  4. For the 3D examples, run cargo run --release --example testbed3

Notable usages of MPM

This gives some insights of some interesting usages of MPM (the Material Point Method) for deformable physics simulation. Note that it doesn’t imply that slosh currently implements these models:

  • Animation: one very well-known usage of MPM is snow simulation by Pixar.
  • Engineering: blast movement simulation (patented).
Commit count: 9

cargo fmt