SDF Text Research

out if interest i tried creating a sdf letter based on valve’s idea, its kinda common in game engines for large text rendering. eg.

i tried following the instruction, create a distance tex based on a hi-res image of the letter/word, scaled it down to something like 64x64px and render this with a drawSDF shader. the distance tex looks smooth but the drawSDF has nasty edges. So i’m missing something here.

Anyone interested and has done it before ? I think it’s kinda cool technique. SDFglyph.v4p (15.8 KB)
(u need Fieldtrip, DX11) (3.4 KB)

not perfect but kinda working

1 Like

also worth noting:

you could use Xenko to generate the font texture and port their shader code:


my second post has already an adopted shader in it. concerning the distance texture generation, the vvvv node is fine for one letter but having a fully working system, it needs some atlas technique…which is another task. i‘ll look into xenkos solution, for sure. looks more sophisticated.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.