WebGPU Implementation of Augmented Vertex Block Descent
Key point
An AVBD-based rigid-body/soft-body physics prototype was implemented with WebGPU.
Details
This is an experimental WebGPU rigid-body / soft-body physics prototype. At its core is an implementation that ports an AVBD (Augmented Vertex Block Descent) style solver to WebGPU, released alongside a live demo.
Installation and running are simple.
npm installnpm run dev- production build:
npm run build
However, this is still an early proof of concept: it's not a plug-and-play module yet, and browser support is currently Chrome only.
The implementation follows the flow of Algorithm 1 from the AVBD paper fairly directly.
- collision detection: performs collision detection at the current position
x^tat the start of the time step. - broad phase: builds and traverses an LBVH to find candidate body pairs.
- narrow phase: builds manifolds and maintains per-contact state for warm-start and friction handling.
- per-body constraint list: gathers the constraints each body should reference based on contacts, joints, and springs.
- coloring: uses greedy coloring to prepare bodies of the same color for parallel processing.
- primal init: builds the inertial target
yand initializes primal state. - colored primal solve: during iterative passes, solves bodies color by color and applies the AVBD primal update.
- dual/stiffness update: updates dual variables and stiffness after the primal sweep.
- finalize velocities: reconstructs velocity from the final state.
The documentation emphasizes that while the current pipeline closely resembles the paper, the double-buffered position updates needed for rare same-color conflicts have not yet been implemented as-is, and the current path is essentially an in-place colored body solve.
In other words, this is less a finished library and more an experimental implementation validating AVBD on WebGPU, making it a meaningful technical demo for developers interested in physics simulation and web graphics.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.