2 ms·
I do recall somewhat recently a great improvement was made to SDF using multiple channels of information: https://github.com/Chlumsky/msdfgen https://github.com
by jchw 7y ago
I do recall somewhat recently a great improvement was made to SDF using multiple channels of information: https://github.com/Chlumsky/msdfgen https://github.com/Chlumsky/msdfgen
I wonder how they both compare. I am guessing Slug is more accurate but certainly also much more intensive, if its actually rendering outlines.
- pcwalton 7y agoAs impressive as it is, msdfgen is not actually a vector renderer. It's a technique that allows each texel to encode the distance to two separate edges instead of one. The edges are selected with a bunch of heuristics, but this can fail on complex outlines with fine detail. It's fairly easy to find fonts that msdfgen fails to properly render at certain sizes.
- jchw 7y agoOf course its not a vector renderer, it is using signed distance fields after all. Still, if you want font outlines on GPU, sometimes what you want is probably SDF (like in video games.) MSDF also has some other disadvantages compared to stock SDF since the distance is less accurate outside the actual font boundary.