4 ms·
There shouldn't really be any performance difference between WebGL and WebGPU in a ShaderToy-like example, given that only requires a single draw-call per frame
by jsheard 9y ago
There shouldn't really be any performance difference between WebGL and WebGPU in a ShaderToy-like example, given that only requires a single draw-call per frame. The API overhead should be utterly negligible in that case.
If WebGPU really does perform better in an apples-to-apples comparison (i.e. running the same shader) then there's something seriously wrong with Apples WebGL implementation.
edit: here's that example translated verbatim to WebGL if you want to compare: https://www.shadertoy.com/view/Mt2fRy https://www.shadertoy.com/view/Mt2fRy
- pjmlp 9y agoWhile you are right, for me WebGL is nothing more than just for prototyping purposes, in what concerns mobile devices. Most of the WebGL demos that get posted around here, always have issues running on my mid-range devices, that don't have any issues playing my collection of 3D games. So I still look forward to a 3D Web API that can actually compete with native 3D across all mobile devices, not only on flagship ones. Or proper implementations of WebGL, if that is actually the issue.
- jsheard 9y agoI'll just refer back to the last time you replied to me with that exact comment :P https://news.ycombinator.com/item?id=16086537 https://news.ycombinator.com/item?id=16086537 I suspect that Three.js is the main reason why so many WebGL demos are slow, rather than WebGL itself.
- pjmlp 9y agoHehe, didn't notice the username. :) Might be, but what counts is the perception when someone goes to a given web page. EDIT: Just tried your shader toy example on an LG Power X, with a Mali T720, it averages on 20FPS.
- jordan314 9y agoThis works great in safari, which makes me wonder why they're doing this at all
- sgt 9y agoI tried that shadertoy and it's running at around 26-28% CPU usage in both Chrome and Safari. So the exact equivalent in WebGL is noticeably harder on the system than the WebGPU version.