Live data from Hacker News

Show HN: GPU text rendering with vector textures

wdobbie.com

31–40 of 91 posts

Re: Show HN: GPU text rendering with vector textures

#32
post #11

Although cool, this is not a particularly novel idea. I remember reading a 2007 SIGGRAPH paper about something similar Valve did in HL2 (or maybe it was Orange Box). Either way, it was a similar method of rendering vector textures via distance fields. Here it is: http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_...

Signed-distance field fonts (as described in that paper by Valve) is very different form the OP's approach.

Re: Show HN: GPU text rendering with vector textures

#34
post #23

no subpixel rendering or hinting. Im confused - is there a problem with cpu rendered fonts that needs fixing? I didnt notice anything wrong last time I was reading schematics and datasheets on 4K monitor.

This is useful for gaming or any other application where text is integrated into a GPU rendered 3D environment and may be subject to affine transformations.

Re: Show HN: GPU text rendering with vector textures

#35

Signed Distance Field fonts are wonderful! I've been using a Unity extension called TextMesh Pro, which works very efficiently, and renders beautiful text that you can configure and decorate in many ways. Beyond the obvious benefits of SDF fonts, it also has excellent and extensive layout, formatting and other useful features, like automatically scaling the text to fit in a given area. The source code for the shaders…

They are good but they do have their weaknesses: Rounded Corners, Not good with thin lines, time required to generate the SDF

Re: Show HN: GPU text rendering with vector textures

#37

This is really neat. Though in practice if you are using this kind of thing I'm pretty sure you will want to combine it with atlasing (i.e. construct an atlas of glyphs via render to texture). That's because it's a waste of time to rerasterize glyphs in the FS every frame (which appears to be 200+ lines) instead of caching the results and reducing the per-frame work to a 5-line FS that just blits. In most apps pans a…

That was my first thought. This is brilliant, but the FS is way overworked, making this less practical and going back to the original solution (because it's fast).

It's a trade off between speed and variability, which for games (and most apps) speed trump variability (especially because of consistent design). But given generating a texture atlas is a "1 time task"; and recompiling the curves in the GPU is per frame in the paper, the next best thing I guess is off loading the glyph atlas generator to the GPU, not CPU, since the GPU maybe faster.

It's really awesome research!

Re: Show HN: GPU text rendering with vector textures

#38

This is really neat. Though in practice if you are using this kind of thing I'm pretty sure you will want to combine it with atlasing (i.e. construct an atlas of glyphs via render to texture). That's because it's a waste of time to rerasterize glyphs in the FS every frame (which appears to be 200+ lines) instead of caching the results and reducing the per-frame work to a 5-line FS that just blits. In most apps pans a…

Wait. I guess you did not read the article at all? It is all about atlasing.

There are issues with atlas of glyphs; so rather than putting the whole glyphs in atlas, he slices the glyphs in a grid, the grid being defined by the intersection of the underlying Bezier curves. And then he puts the grid pieces in atlas.

Re: Show HN: GPU text rendering with vector textures

#39

Great work! Is there any WebGL source available? The demo runs very poorly on my 15" MBP (late 2013, Intel Iris Pro). I'm not sure if it's just the sheer number of glyphs being rendered at once, or whether it's something specific that this GPU is having trouble with. Some related links for those interested in WebGL text rendering: 1 - https://github.com/Jam3/three-bmfont-text 2 - http://mattdesl.svbtle.com/material-d…

i too, am interested in the sources. Viewing the source on the page is an OK option too i guess, but it'd be nice to have it as a library that i can examine (and potentially use!)
Post reply on HN