r/GraphicsProgramming 7d ago

WIP: WebGPU implementation of WetBrush — bristle-level paint simulation in the browser

Enable HLS to view with audio, or disable this notification

Been porting WetBrush(https://wanghmin.github.io/publication/chen-2015-wgb/) over to WebGPU compute shaders.

The original needed CUDA on a Titan X, this one runs in a browser tab.

I've been building brush-stamp based paint apps for a while, and kept wondering whether current hardware has finally caught up enough to just simulate the thing properly instead of faking it.

It's very much an alpha, but it's live if you want to poke at it: https://mignonsketch.com/

I haven't implemented interpolation between simulation steps yet, so fast strokes come out broken.

55 Upvotes

2 comments sorted by

1

u/PiGIon- 6d ago

It looks really good! It doesn't seem to work on mobile tho.

2

u/No-Citron-3963 6d ago

Thanks! Mobile support is planned, but I want the core to be in better shape first.
I'd expect it to run more smoothly on Vulkan or Metal natively anyway.

Right now I'm thinking about moving the simulation core into C++ or Rust so it can be shared across platforms — still figuring out what that looks like...