News for hackers. Stuff that matters.
Re:WebGPU demos by sgt on Friday January 19, 2018 @09:03AM (#16186219)
This is amazing - I've never run any kind of demos like this before in a browser (i.e. WebGL) that didn't immediately spin up all fans with 100%+ CPU usage for the browser. I ran the Shadertoy on a 4k monitor in full screen mode and CPU (as well as energy usage) was minimal, if noticable at all on my MacBook Pro. (Edited: Which means it's using the GPU only... that's the whole point here.)
Re:WebGPU demos by jsheard on Friday January 19, 2018 @09:08AM (#16186250)
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

Re:WebGPU demos by sgt on Monday January 22, 2018 @04:31AM (#16203088)
I 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.

Re:WebGPU demos by pjmlp on Friday January 19, 2018 @10:32AM (#16186934)
While 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.

Re:WebGPU demos by jsheard on Friday January 19, 2018 @10:40AM (#16186998)
I'll just refer back to the last time you replied to me with that exact comment :P

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.

Re:WebGPU demos by pjmlp on Friday January 19, 2018 @10:49AM (#16187077)
Hehe, 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.

Re:WebGPU demos by jordan314 on Friday January 19, 2018 @12:24PM (#16187940)
This works great in safari, which makes me wonder why they're doing this at all