3 ms·
I wonder if WebGPU could help with app GUI. I tried to understand how does it work but it seems it's all about triangles, so it's not really clear if it has any
by vbezhenar 4y ago
I wonder if WebGPU could help with app GUI. I tried to understand how does it work but it seems it's all about triangles, so it's not really clear if it has any benefit over plain Canvas for standard UI approaches.
- Cloudef 4y agoPlease don't use canvas or webgpu for GUI unless it's a game or other interactive experiment. Webgpu will drop compatibility with hardware and no accessibility, you would have to build everything up from ground again that web browsers already offer with DOM like flutter does by having "overlay DOM" on top of canvas to provide accessibility, and it's kinda janky. Now that's out of the way, sure you can do GUI with webgpu, see for example IMGUI or NanoGUI (NanoVG based).
- fulafel 4y agoIt would be interesting to get complete apps running there. Wasm-on-GPU seems a reasonable match since there's no OS APIs in Wasm.