Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Particles4All

Position Based Fluids in WebGPU: water and rigid bodies solved in the same constraint loop, with the surface rendered in screen space.

スクリーンショット 2026-08-20 234309

The features of this repo are like below:

レコーディング 2026-08-22 140438

Demo video

fluid_compressed.mp4

Simulation

Unified particle physics

(TODO: write)

Surface tension

(TODO: write)

Rendering

Screen-space fluid rendering using narrow-range filter

(TODO: write)

Anisotropic kernels for smoothing the fluid surface

(TODO: write)

Run it

WebGPU needs a secure context, so open it over http rather than from file://:

python -m http.server 8080

then http://localhost:8080. Chrome or Edge 113+, Safari 18+, or Firefox with WebGPU enabled. No build step, no dependencies — it is ES modules and WGSL.

Scene picks the size, quality is the fraction of the window the per-pixel passes run at, box size moves a wall while the water is in it, and Pour water runs a hose from the near wall. Left-drag rotates, right or middle drag pans, the wheel zooms, moving the pointer over the water pushes it, space pauses, H hides the controls and D opens the debug window.

Panorama: Quarry Cloudy by Poly Haven, CC0.

About

Unified particle solver for fluid and rigid bodies based on Position Based Dynamics

Topics

Resources

Stars

81 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages