A WebGPU implementation of Augmented Vertex Block Descent (github.com)

by juretriglav 24 comments 150 points
Read article View on HN

24 comments

[−] zokier 36d ago
Do you see "Offset Geometric Contact" paper fitting into this project somehow? https://graphics.cs.utah.edu/research/projects/ogc/
[−] juretriglav 36d ago
I actually have an implementation of that too, since I was fascinated by the twisting cloth example, but need to figure out how best to incorporate it, or if it’s better in a standalone experiment.
[−] jackling 36d ago
Awesome work, what always prevents me from implementing more solvers is the amount of math required. While the implementation always seems simple, understanding the different optimization strategies for each solver gets confusing.

It's really impressive that the author was able to implement rendering papers and physics sim papers with such regularity. It really is a feat. Makes me curious to see what their background is.

[−] madbo1 31d ago
The direction seems very interesting indeed. Using optimization algorithms such as Augmented Vertex Block Descent in WebGPU marks a step towards doing proper numerical computations right in the browser and not just visualizations and/or ML inferences.

Perhaps, more importantly, this development makes optimization approaches more accessible by eliminating the need for special environments (CUDA, native compilation, and alike).

I am very interested in comparing the performance of these optimizations in comparison with native GPU implementations, especially in terms of memory throughput and precision limits.

[−] Ciantic 36d ago
AVBD also has this page https://graphics.cs.utah.edu/research/projects/avbd/ I don't know how this implementation differs from the one they are demoing but this one by Jure Triglav feels much smoother to me.
[−] sho_hn 36d ago
I'm super frustrated by the state of 3D on web right now as an app developer. I wish we just had Vulkan on the web ...

Right now your options are basically having a GLES renderer that you can restrict to WebGL2 (so no compute shaders, etc. and other things that make desktop OpenGL acceptable for writing a modern renderer) or having to abstract over Vulkan/WebGPU yourself, which are similar but different enough to increase your code complexity considerably.

There's abstractions like wgpu and bgfx you can commit to, and of course you can just use game engine middleware and have it all done for you, but overall things fall short of just being able to "write once, run anywhere" a renderer, sadly.

[−] mjmdavis 36d ago
This is really awesome. Great work.

I aspire to build cool stuff like this in WebGPU.

Very excited for the future of the web.

[−] spencer9714 36d ago
Great work on the AVBD implementation! I’m building a decentralized GPU compute platform (using Node.js/WebGPU). Since the solver uses a 'coloring' approach for parallelism, how do you handle compute preemption or state recovery if a worker/tab is closed mid-solve? Is it feasible to serialize the solver state efficiently for a distributed queue?
[−] jmrgz 35d ago
Really impressive that this runs entirely in the browser with no native plugins. Is there a rough estimate on how many rigid bodies it can handle before framerate drops significantly?
[−] the-golden-one 36d ago
Why do all physics engines still look so floaty?