Re:WebGPU Shading Language
by jfkebwjsbx on Tuesday March 10, 2020 @08:33PM
(#22541655)
Being able to develop with the browser has nothing to do with WebGPU being binary or text.
It seems you speak with "we", as if you were part of the committee? If that is a yes: how can we become part of that committee to amend this mistake? Who has voting rights?
How are you suggesting to write shaders in the browser if they are expected to be in a binary form?
WebGPU community group is open to anyone interested: https://www.w3.org/community/gpu/
We can compile and run c++ code in a browser with WASM versions of clang, why would it be any issue to compile glsl / any other language to spir-v ? That's already what almost everyone is doing with spirv-cross / shaderconductor on the desktop
WebGPU doesn’t provide new APIs in the same sense that WASM doesn’t provide new APIs, they just provide alternative APIs to accomplish the same tasks, but faster.
Anything you can do with WebGPU you could do in JavaScript, in the same sense that anything you can do with WASM you can do in JavaScript. The only difference is performance.
WASM by itself doesn't provide new APIs, it's still just a different way to expose the Web platform. So WASM being optional doesn't limit anybody in what they can do. Having WebGPU optional does limit what you can do on the web. We want WebGPU to be available in a wide sense (accessibility, dependencies, portability, everthing).