Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

Starting to multithread with WebAssembly.

21,426 Aufrufe • vor 1 Jahr •via X (Twitter)

9 Kommentare

Profilbild von Grant Kot
Grant Kotvor 1 Jahr

very early wip demo:

Profilbild von Brian Jordan
Brian Jordanvor 1 Jahr

Siiiick I'm curious are there things they can be sped up with multi threaded WASM that might not be candidates for WebGPU parallelization?

Profilbild von Grant Kot
Grant Kotvor 1 Jahr

my main ideas are adaptive particle resolution to give the surface more detail, and using multiple resolutions of grids like a coarser one to help improve incompressibility. CPU has more flexibility to do stuff like that though it is possible on GPU as well. also have some visual plans to work the GPU.

Profilbild von Ben Stephens
Ben Stephensvor 1 Jahr

cool! any tips/learnings on multithreading for webassembly?

Profilbild von Grant Kot
Grant Kotvor 1 Jahr

to prep, i cut down on communication between threads by going with coarser simulation sections. it does get a little unbalanced when the water is pushed along the edges. with single threaded wasm i like to call the simulation step from JS where i can do a lot of custom stuff. seems to be either a lot of overhead or latency though when multithreaded so will need to investigate that further. on iOS, using shared memory will make your stuff prone to out of memory errors.

Profilbild von Grant Kot
Grant Kotvor 1 Jahr

I'm using Emscripten to compile my C++ to Wasm. I use the taskflow library to do Pthreads based multithreading. Also of interest is the Wasm Workers API, which might give both smaller build sizes and control for optimization.

Profilbild von Jimminy
Jimminyvor 1 Jahr

@Pancracio9001 wasm

Profilbild von vincent
vincentvor 1 Jahr

Amazing work. I was just reading about the math behind water sims in an old NVIDIA GPU gems book

Profilbild von Joe
Joevor 1 Jahr

crazy how PCs have had multithreading since 2002 yet its still nurfed in many browsers

Ähnliche Videos