4 ms·
It's a replacement for WebGL, but the key difference is that it supports compute shaders.
by Tade0 4y ago
It's a replacement for WebGL, but the key difference is that it supports compute shaders.
- boppo1 4y agoIs it a replacement? It looks more like a framework that lives on top of webgl.
- incrudible 4y agoWebGPU is to WebGL as Vulkan is to OpenGL, a lower level, low overhead graphics API.
- msk-lywenn 4y agoIt's the other way around. WebGPU is to Vulkan what WebGL is to OpenGL. It's less low level than vulkan though.
- danielvaughn 4y agoYou shouldn't be downvoted, your question is reasonable even if it demonstrates a misunderstanding. So it's not a wrapper over WebGL, it's a more modern, lower-level GPU programming model. There are equivalent efforts in native environments to replace OpenGL - notably Vulkan and (Apple's) Metal. As far as I understand, the approach allows far more flexibility, at the expense of higher complexity. It's less "stateful" than WebGL, which basically gives you a big class that manages everything OOP-style.
- irate2942 4y agoWebGL2 also supports them! And now that Apple finally added support (like half a year ago(?)) to it, it can be fairly safely used
- raphlinus 4y agoI believe WebGL compute shader development has been halted[1], in favor of making WebGPU happen. Though it's possible to run it in dev builds in some cases, I'm pretty sure there's no browser that has it on by default, and likely this won't happen. Apple does support WebGL2, but compute shader support is not part of that core spec. The demos[2] certainly don't work in Safari in my quick test. [1]: https://registry.khronos.org/webgl/specs/latest/2.0-compute/ https://registry.khronos.org/webgl/specs/latest/2.0-compute/ [2]: https://9ballsyndrome.github.io/WebGL_Compute_shader/webgl-compute-boids/dist/ https://9ballsyndrome.github.io/WebGL_Compute_shader/webgl-c...
- pjmlp 4y agoThanks Google that dropped them out of Chrome and we all know how the Web is basically whatever Chrome does, so WebGPU it is.
- unconed 4y agoIt also supports many more features in rendering which previously were unavailable or so badly supported you couldn't use them. It's basically like going from 2005 to 2015 in terms of capabilities. There are still notable gaps, like no bindless resources or raytracing though. So don't expect e.g. unreal engine to run on WebGPU without some significant compromises.
- markdog12 4y agoSomeone patched Chrome to enable raytracing with WebGPU: https://github.com/maierfelix/chromium-ray-tracing https://github.com/maierfelix/chromium-ray-tracing