正在加载视频...

视频加载失败

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 😳

125,675 次观看 • 3 年前 •via X (Twitter)

11 条评论

Mykhailo Moroz 的头像
Mykhailo Moroz3 年前

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

Mykhailo Moroz 的头像
Mykhailo Moroz3 年前

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.

Mykhailo Moroz 的头像
Mykhailo Moroz3 年前

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

Mykhailo Moroz 的头像
Mykhailo Moroz3 年前

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)

Mykhailo Moroz 的头像
Mykhailo Moroz3 年前

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)

Mykhailo Moroz 的头像
Mykhailo Moroz3 年前

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

Mykhailo Moroz 的头像
Mykhailo Moroz3 年前

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

Felipe Apablaza 的头像
Felipe Apablaza3 年前

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

END 的头像
END3 年前

@Atrix256 @david_ar @cornusammonis yooo @XorDev

Kushiro 的头像
Kushiro3 年前

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

Mykhailo Moroz 的头像
Mykhailo Moroz3 年前

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

相关视频