WebGPU is a textbook case of Embrace Extend Extinguish performed by Apple to kill Kronos and SPIRV, and everybody is cheering it on. Crazy.
WebGPU – All of the cores, none of the canvas
41–50 of 137 posts
Re: WebGPU – All of the cores, none of the canvas
#42Earlier quoted context omitted.
True, but this API will make that use case simple and obvious. Given the tradeoffs, probably worth it for user agents to permission-gate it.
You can always disable hardware acceleration in your browser.
Re: WebGPU – All of the cores, none of the canvas
#43Re: WebGPU – All of the cores, none of the canvas
#44So now there are three incompatible graphics APIs in the browsers which are also incomplete in different ways. Each of them is a huge chunk of code that needs to maintained and updated.
Re: WebGPU – All of the cores, none of the canvas
#45If I'm already familiar with Rust, how is WebGPU as an introduction to graphics programming if you aren't already familiar with any of the backends that it wraps? Should I try just learning Vulcan first? Is the abstraction layer just going to introduce additional confusion for a newbie?
I think one of WebGPU's greatest strengths is learning, as you can get started pretty easily, and you actually learn a modern approach to GPU. Vulkan requires a significant amount of boilerplate just to establish a connection to the GPU and set up basic resources like the ability to allocate buffers. In WebGPU, the latter is one or two lines of code. That said, there are some really nice learning resources for Vulkan…
I first tried WebGPU, and was so overwhelmed with detail that it was nearly impossible to connect the dots. So I went back and decided to learn WebGL first. I know that it's very different, but the whole state machine thing makes it so much easier to understand, at a conceptual level, what you're trying to do.
It didn't even take that long, just a couple of weekends and I was already familiar with the basics. I'm not going to waste time trying to become super proficient, but it gives me enough context to go back and try WebGPU again.
Re: WebGPU – All of the cores, none of the canvas
#46Re: WebGPU – All of the cores, none of the canvas
#47Am I understanding this right, that websites can now run a crypto miner in the background when I visit them?
Re: WebGPU – All of the cores, none of the canvas
#48WebGPU is a textbook case of Embrace Extend Extinguish performed by Apple to kill Kronos and SPIRV, and everybody is cheering it on. Crazy.
The whole purpose of Vulkan was an open API that could work on all vendors. I'm not sure why they based WebGPU on Metal over the Mozilla proposal. Now Apple can control the future evolution of it by saying "metal 1.X does it this way." With a Vulkan based webgpu Khronos could do the same, but their "vulkan 1.X does it this way" would have already been the result of a cross-vendor standards committee instead of from a…
Re: WebGPU – All of the cores, none of the canvas
#49Earlier quoted context omitted.
"Is the abstraction layer just going to introduce additional confusion for a newbie?" As a newbie you probably don't want to deal with WebGPU directly, but rather use (wait for) a framework, that takes care of the details.
depends on your objective, doesnt it? if you eant to learn how things work & what the fundamnetals are, im not sure that a big engine or framework "taking care of the details" is going to be as illuminating. also, from the article, some poditive reinforcement about trying WebGPU: > I got my feet wet and found that I didn’t find WebGPU significantly more boilerplate-y than WebGL, but actually to be an API I am much mo…
Sure, thats why I said "probably".
Anyone who wants the most performance and raw power needs to get to the source.
But most people using WebGPU are probably fine with a framework, that hides all the details. Like threejs did for webGL.
Re: WebGPU – All of the cores, none of the canvas
#50With the "fun" to rewrite all WebGL shaders into WGSL.
You can use the SPIR-V compiler toolchain to just transpile from GLSL to WGSL :)
Tint (Google, implemented in C++): https://dawn.googlesource.com/tint/
Naga (Mozilla(?), implemented mostly in Rust): https://github.com/gfx-rs/naga
Both are a bit similar to SPIRV-Cross, except that they also support WGSL.