Live data from Hacker News

The web at maximum FPS: How WebRender gets rid of jank

hacks.mozilla.org

21–30 of 212 posts

Re: The web at maximum FPS: How WebRender gets rid of jank

#21
post #8
post #2

Good stuff. Speaking of rendering text glyphs on the GPU, there's a really clever trick(commonly called loop-blinn, from the two authors): https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch25.... You can pretty much just use the existing bezier control points from TTF as-is which is really nice.

If only it were as simple as just using Loop-Blinn. :) The technique described there will produce unacceptably bad antialiasing for body text. Loop-Blinn is fine if you want fast rendering with medium quality antialiasing, though. (Incidentally, it's better to just use supersampling or MLAA-style antialiasing with Loop-Blinn and not try to do the fancy shader-based AA described in that article.) Additionally, the ori…

How portable is pathfinder? Are there plans for metal and/or vulkan support? Is it extensible to general purpose path-and-clip rendering?

Re: The web at maximum FPS: How WebRender gets rid of jank

#22
post #13

Now that this is closer to shipping, I'm curious what impact this would have on battery life. On the one hand, this is lighting up more silicon; on the other hand: a faster race to sleep, perhaps? Have there been any measurements on what the end result is on a typical modern laptop?

Despite the huge fans and heatsinks on modern desktop GPUs, I presume that a GPU would still use less energy than a CPU for the same workload, yes? Do mobile GPUs have a sleep mode comparable to mobile CPUs? Completely agreed that some measurements would be nice.

Re: The web at maximum FPS: How WebRender gets rid of jank

#23
post #19
post #8

Earlier quoted context omitted.

If only it were as simple as just using Loop-Blinn. :) The technique described there will produce unacceptably bad antialiasing for body text. Loop-Blinn is fine if you want fast rendering with medium quality antialiasing, though. (Incidentally, it's better to just use supersampling or MLAA-style antialiasing with Loop-Blinn and not try to do the fancy shader-based AA described in that article.) Additionally, the ori…

I hadn't seen Pathfinder before; very cool! Especially if it's easily transferable to gpuweb, if and when that ships. Reminds me of Mark Kilgard's old NV_path_rendering extension, which (as so often happened for interesting NV stuff) never made the jump to portability. One of its touted benefits as an in-driver implementation was the ability to share things like glyph caches between multiple apps with separate GL con…

> BTW, is the WebGL demo available online anywhere, for people who don't want to install npm?

Not yet. There are enough known issues that I'd like to fix first.

Re: The web at maximum FPS: How WebRender gets rid of jank

#24
post #8

Earlier quoted context omitted.

If only it were as simple as just using Loop-Blinn. :) The technique described there will produce unacceptably bad antialiasing for body text. Loop-Blinn is fine if you want fast rendering with medium quality antialiasing, though. (Incidentally, it's better to just use supersampling or MLAA-style antialiasing with Loop-Blinn and not try to do the fancy shader-based AA described in that article.) Additionally, the ori…

I'm very excited about your work on Pathfinder! I think great possibilities will open up once there is a way to efficiently rasterize vectors on the GPU. Do you think, once the implementation is more complete, that it would make it possible to render fullscreen scenes of vector graphics (say in SVG) with hundreds of moving and morphing shapes on a mid-range phone/tablet/pc? I know it's very difficult to predict these…

One of the goals of Pathfinder 2 is to support SVG well. Initial results are promising, but it's too early for me to want to speculate.

Re: The web at maximum FPS: How WebRender gets rid of jank

#25
post #8

Earlier quoted context omitted.

If only it were as simple as just using Loop-Blinn. :) The technique described there will produce unacceptably bad antialiasing for body text. Loop-Blinn is fine if you want fast rendering with medium quality antialiasing, though. (Incidentally, it's better to just use supersampling or MLAA-style antialiasing with Loop-Blinn and not try to do the fancy shader-based AA described in that article.) Additionally, the ori…

How portable is pathfinder? Are there plans for metal and/or vulkan support? Is it extensible to general purpose path-and-clip rendering?

See the README: https://github.com/pcwalton/pathfinder

Re: The web at maximum FPS: How WebRender gets rid of jank

#26
post #8
post #2

Good stuff. Speaking of rendering text glyphs on the GPU, there's a really clever trick(commonly called loop-blinn, from the two authors): https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch25.... You can pretty much just use the existing bezier control points from TTF as-is which is really nice.

If only it were as simple as just using Loop-Blinn. :) The technique described there will produce unacceptably bad antialiasing for body text. Loop-Blinn is fine if you want fast rendering with medium quality antialiasing, though. (Incidentally, it's better to just use supersampling or MLAA-style antialiasing with Loop-Blinn and not try to do the fancy shader-based AA described in that article.) Additionally, the ori…

Well there's also the problem that it's heavily patented :).

Just throwing it out there as a neat thing, the GPU space has all sorts of fun stuff like that.

I'll have to take a look at Pathfinder, have any links handy that I can dig into?

Re: The web at maximum FPS: How WebRender gets rid of jank

#27
post #20
post #2

Good stuff. Speaking of rendering text glyphs on the GPU, there's a really clever trick(commonly called loop-blinn, from the two authors): https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch25.... You can pretty much just use the existing bezier control points from TTF as-is which is really nice.

Do they generate those triangles for each instance of each glyph, or only once for each character in the font?

Just once per character in the font.

Re: The web at maximum FPS: How WebRender gets rid of jank

#28
post #20
post #2

Good stuff. Speaking of rendering text glyphs on the GPU, there's a really clever trick(commonly called loop-blinn, from the two authors): https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch25.... You can pretty much just use the existing bezier control points from TTF as-is which is really nice.

Do they generate those triangles for each instance of each glyph, or only once for each character in the font?

I'm not sure what you mean by "they" and "character" here. In general, the tessellation, whether it's constrained Delaunay triangulation or a Lorenzetto style trapezoidation as Pathfinder uses, needs only be done once per glyph and then can be reused for any size. However, note that both hinting and stem darkening for gamma correction distort the glyph outlines in a way that depends on the pixel size, so it's not quite that simple.

Re: The web at maximum FPS: How WebRender gets rid of jank

#30
post #13

Now that this is closer to shipping, I'm curious what impact this would have on battery life. On the one hand, this is lighting up more silicon; on the other hand: a faster race to sleep, perhaps? Have there been any measurements on what the end result is on a typical modern laptop?

I know it’s not officially released, so I’m hoping it gets fixed, but FF57 rips through my Mac’s battery life and runs insanely hot on simple JS apps. I still use it daily because it generally works, but there are a few apps I just have to go to Chrome for.
Post reply on HN