Chrome flickers. A cluster of rigid cubes hurtles toward each other—bam!—colliding in a frenzy of sparks and shards, while a squishy blob warps like digital taffy under the onslaught. No native app. No WebAssembly crutch. Just pure WebGPU, hurling an experimental physics engine straight into the heart of the browser.
Zoom out: we’re staring at ‘A WebGPU Implementation of Augmented Vertex Block Descent,’ a scrappy open-source prototype that’s basically a love letter to bleeding-edge web graphics. Dropped by some mad graphics wizard (shoutout to the creator’s plea for support), it’s a proof-of-concept faithful to the 2025 AVBD paper by Giles et al. Think rigid-body pileups, soft-body stretches— all solved via this clever ‘augmented vertex block descent’ method. And it’s running on your dev server with a simple npm run dev.
But here’s the electric bit— this isn’t some toy. It’s a pipeline mirroring Algorithm 1: broad-phase culling with LBVH trees, narrow-phase manifold magic, greedy coloring for parallel solves, primal updates on inertial targets, dual tweaks, velocity rebuilds. Code snippets abound, from PhysicsEngine.ts orchestrating substeps to GPU shaders in avbdState.ts crunching the math.
Collision Detection: The Starting Gun
Collision detection kicks off every timestep, scanning positions before solvers even wake up. Broad phase? LBVH traversal spits out candidate pairs fast. Then narrow phase builds manifolds, warm-starts contacts for friction—straight from paper sections 3.3, 3.7, 4. It’s meticulous, preserving state across frames so nothing glitches on repeat crashes.
Per-body constraints gather next—forces from contacts, joints, springs funneled into lists. Coloring follows: greedy algorithm slaps hues on bodies so same-color ones solve in parallel, no interdependencies exploding the compute.
The current rigid-body pipeline follows the structure of Algorithm 1 from the AVBD paper, with broad phase, narrow phase, warm-started contact state, colored body solves, dual updates, and final velocity reconstruction.
That’s the creator’s own words—journalistic gold, pulling you into the guts.
Primal Solves: Where the Chaos Lives
Main loop? Colored primal body solves. For each iteration, each color: accumulate forces, assemble local systems, slam AVBD updates using approximate Hessians (Section 3.5). Duals and stiffnesses ramp up post-sweep, augmented-Lagrangian style. Velocities reconstruct at the end—sleep states and diagnostics optional extras.
One quirk: paper loves double-buffered positions for edge-case color conflicts; this proto goes in-place. Experimental, sure—Chrome-only for now—but stability tweaks are coming.
Imagine it like herding cats on a GPU: vertices as wild kittens, blocks as corrals, descent pulling them into physical reality. AVBD augments the usual with smarter warm-starts and scalings (alpha, gamma)—faster convergence than plain old Gauss-Seidel.
Why WebGPU? Because Browsers Were Bored
WebGPU isn’t just shaders and triangles anymore. It’s compute shaders feasting on physics sims—parallelism unbound, no wasm middleman. Remember WebGL? That was browsers discovering 3D parties. WebGPU? Full-on physics raves.
This prototype screams potential: real-time sims for games, VR previews, interactive CAD. No downloads. No installs. Devs spin up npm install, tweak, deploy.
But —and here’s my unique spin, absent from the README— this echoes the JavaScript moment. Back in ‘95, JS turned static pages into apps. AVBD on WebGPU? That’s physics as a browser primitive. Bold prediction: by 2027, expect Unity exports or Godot ports natively WebGPU’d, AAA indies ditching Steam for web-first launches. Corporate hype? Nah, the paper’s academic rigor grounds it—no vaporware vibes.
Can WebGPU AVBD Scale to Real Games?
Short answer: not yet. Chrome-only, no plug-and-play, in-place updates risking rare glitches. Performance? Substeps chug on complex scenes, but GPU acceleration shines on mid-range hardware.
Yet. The pipeline’s tight—collision from x^t, inertial y builds, primal init with warm-starts. Add soft-body extensions (teased in the teaser vid), and you’re golden. Critics might scoff at ‘experimental,’ but that’s open-source oxygen: iterate fast, ship wild.
Picture medical sims training surgeons in-browser. Or AR furniture drops—IKEA-style, but with realistic cloth folds and bounces. Webphysics.
The Missing Pieces — And What’s Next
Sleep? Diagnostics? Tacked on outside the core loop. Production build via npm run build, but ease-of-use lags. Future: multi-browser (Safari? Firefox?), stability passes, maybe WASM fallback.
It’s messy —double newlines in code comments, mp4 teasers— but that’s prototype poetry. Support the creator; more experiments await.
My take? This isn’t hype. It’s the web evolving— from pixels to physics. Like electricity democratizing factories, WebGPU electrifies sims. We’re not watching code. We’re witnessing browsers become simulation machines.
Why Does AVBD Matter for Web Devs?
Devs: tired of Three.js hacks for basic collisions? AVBD delivers production-grade solvers—parallel, warm-started, GPU-native. Fork it. Hack soft-bodies. Build that destructible terrain demo you’ve shelved.
Historical parallel I love: PhysX on CUDA killed CPU physics in the 2000s. WebGPU AVBD? Same leap for browsers. No more ‘port to native’ excuses.
Energy here is palpable—it’s web graphics on steroids, open-source heart pumping.
🧬 Related Insights
- Read more: Deploynix Multi-Org: Agencies Finally Get Sanity
- Read more: Forgetful AI Agents? This Solo Dev’s BrainDB Fixes Memory with SQLite Smarts and Overnight Fact-Checks
Frequently Asked Questions
What is Augmented Vertex Block Descent (AVBD)?
AVBD’s a solver for rigid/soft-body physics—uses block-wise descent on vertices, augmented with duals and stiffness ramps for faster, parallel convergence. From Giles et al. 2025; crushes traditional methods on GPUs.
How do I run the WebGPU AVBD physics demo?
npm install, then npm run dev. Chrome Canary recommended—heads up, experimental, no broad browser love yet.
Will WebGPU physics like this work in production games?
Soon. Polish incoming: stability, multi-browser, soft-body polish. Game-changer for web-first titles, but iterate carefully now.