News for hackers. Stuff that matters.
Re:The web at maximum FPS: How WebRender gets rid of jank by pcwalton on Tuesday October 10, 2017 @01:05PM (#15443437)
They do, but we're targeting Intel HD quality graphics, not gaming-oriented NVIDIA and AMD GPUs.

That said, even Intel GPUs can often deal with large numbers of draw calls just fine. It's mobile where they become a real issue.

Aggressive batching is still important to take maximum advantage of parallelism. If you're switching shaders for every rect you draw, then you frequently lose to the CPU.

Re:The web at maximum FPS: How WebRender gets rid of jank by SomeCallMeTim on Tuesday October 10, 2017 @01:22PM (#15443578)
Speaking of batching, I look at this demo [1] on my mobile phone, and I can get ~3500 sprites without dropping below 60FPS.

A web page may not be able to reuse as much image data, I know. But smart game engines frequently look for ways to better batch sprites.

And technically speaking, if you're using a Z-buffer, you don't need to sort opaque layers at all. You can draw the layers in back and then draw more layers in front. Yes, you get overdraw in that case, but if you're using Z values for layering, you could potentially get better batches by drawing in arbitrary order (i.e., relying on Z-depth to enforce opaque object order), and in my experience larger batches gives you a bigger advantage than reducing overdraw.

[1] http://www.goodboydigital.com/pixijs/bunnymark/

Re:The web at maximum FPS: How WebRender gets rid of jank by markdog12 on Tuesday October 10, 2017 @02:32PM (#15444188)
Interestingly, WebRender renders that demo at about 2fps. It's obviously a bug though, if you hold in the mouse, it's 60fps.

Win 10, latest nightly, WebRender enabled

Re:The web at maximum FPS: How WebRender gets rid of jank by steveklabnik on Tuesday October 10, 2017 @04:40PM (#15445138)
Weird; I'm on Win 10 with the latest nightly and WebRender enabled, I'm still getting 60fps with 10,000 bunnies. Maybe file a bug?
Re:The web at maximum FPS: How WebRender gets rid of jank by markdog12 on Tuesday October 10, 2017 @07:45PM (#15446189)
Interestingly enough, I'm getting same result on Mac OS. Unless I hold in the mouse, I get about 2 fps. Seems like the same result on all canvas instances. I'll file a bug.

Edit: https://bugzilla.mozilla.org/show_bug.cgi?id=1407448

Re:The web at maximum FPS: How WebRender gets rid of jank by chronial on Tuesday October 10, 2017 @07:22PM (#15446097)
As far as I understand this, that demo will have no benefit whatsoever from the changes described in the article. Since it uses <canvas> with WebGL, it has always done all its rendering on the GPU in a videogame style way – in any version of any browser.
Re:The web at maximum FPS: How WebRender gets rid of jank by SomeCallMeTim on Wednesday October 11, 2017 @11:53AM (#15450728)
Correct. But the idea is that WebRender uses the same (general) techniques that a game-engine like this would use to make web page renders happen faster.
Re:The web at maximum FPS: How WebRender gets rid of jank by MBCook on Tuesday October 10, 2017 @03:25PM (#15444619)
Safari obviously has some optimization’s being used. On my iPhone 7 it had no issues at all until around 60k. At that point adding new bunnies would slow it down but as soon as you stopped touching it would pop back up to 60fps.

I had to get to hundreds of thousands (maybe 250k?) and it started bouncing between 40 and 60.

Very neat.

Re:The web at maximum FPS: How WebRender gets rid of jank by djhworld on Tuesday October 10, 2017 @02:07PM (#15443967)
Will there be a baseline GPU requirement for Firefox to enable this feature?

For video games you often see minimum/recommended hardware specifications to run a game.

Re:The web at maximum FPS: How WebRender gets rid of jank by Gankro on Tuesday October 10, 2017 @02:28PM (#15444151)
There will only be minimum requirements for GL/DirectX versions. I believe we require GLES 3.1, and then whatever DX version Angle turns that into.
Re:The web at maximum FPS: How WebRender gets rid of jank by steveklabnik on Tuesday October 10, 2017 @02:14PM (#15444032)
I have a Thinkpad T40s with intel integrated graphics, it struggles playing games. I’ve had WebRender turned on for about a month; it generally works well modulo bugs, which all bleeding edge software has, of course.