正在加载视频...
视频加载失败
Now that the latest Chrome version has WebGPU support I guess I can finally talk about this. A year ago David A Roberts and Cornus Ammonis were developing a compute shader based Shadertoy alternative called I already had a lot of fun making some toy projects 😳
11 条评论

Of the more interesting things that I did was the Kerr black hole accretion disk simulation

Another was a forwardly rendered volumetric path tracer (rays go from light source to camera, not the other way around) This one used atomicAdds to rasterize points.

And also using the atomic rasterizer I made a cool looking particle demo

Also a long time ago I did a pet project trying to simulate a nonlinear wave equation in a black hole metric (with questionable results)

Since this is compute based you can be sure you can make things that go way beyond Shadertoy limitations, so its pretty exciting what people might make here👀 (I'm especially looking forward to algorithms like radix sort, hash grids, building BVH's etc)

Also don't forget to join the discord in case you have questions

Also this thing is open source! (forgot to tell)

@david_ar @cornusammonis WebGPU runs at full native speed? Do you have some metrics of it compared to a desktop equivalent implementation?

@Atrix256 @david_ar @cornusammonis yooo @XorDev

@david_ar @cornusammonis What is the most interesting thing that cannot be done in glsl but do-able in web compute ? Any examples ? 🤔

I'd say its more about the scale and performance, than can or can not do. Both are Turing complete after all. For example, with compute you can do a fast radix sort and build an acceleration structure to efficiently find collisions between particles. In WebGL 2.0 you won't be able to use radix sort, bitonic at best, and even that would be way slower compared to pure compute bitonic. Also compute gives random write capability, which makes it easier to implement stuff that might require lots of data per thread. Or scattering operations for example (like custom triangle rasterization). In terms of code stuff there are mainly these differences: a)random read/write, b)atomic operations, c)access to groupshared memory and group barriers
