Original Post
MK42 handily posted the link to Valve's graphics papers, and Improved Alpha Tested Magnification caught my eye. In particular I think it's be a nice alternative/replacement for my existing font rendering code, as it should allow much greater quality when scaling. Has anyone implemented this? It seems to be light on details as to how to create the distance field texture from the high res input, and I'm struggling with this bit:
Quote:So I guess if we were generating a 64x64 distance field from a 2048x2048 binary input, the first step would be analyzing the relevant 32x32 pixel chunk for each output texel to determine the "in" or "out" state. Would this be just a simple average of whether those 32x32 pixels are solid or not? Or something more complicated than that? I'm going to have a crack at this tonight, but maybe someone who has already implemented this could let me know if I'm on the right track. [Edited by - OrangyTang on April 12, 2008 9:38:19 AM]
For each output texel, the distance field generator determines whether the corresponding pixel in the high resolution image is "in" or "out". Additionally, the generator computes 2D distance (in texels) to the nearest texel of the opposite state. This is done by examining the local neighborhood around a given texel.


