Part of the Khronos Group

Stefan Gustavson presents an Improved distance transform method

Oct 06, 2009

Stefan Gustavson has developed a distance transform method that takes an anti-aliased alpha map as input and computes a distance field with accurate sub-pixel resolution, without the need for a 4K+ binary alpha map—a modestly sized alpha map rendered with proper AA is enough. In 2007, Chris Green at Valve presented a method for crisp, anti-aliased real time contour graphics based on distance map textures. The method is very useful, but all classic distance transform methods use binary input images and therefore require almost insane resolutions to yield a good enough distance map for this application. A pre-publication write-up and GPL source code is available.

Category: Developers

Posted on 10/06 at 01:01 PM


I was actually looking at ways of improving AA today, so are interested.

Looks beautiful, until you rotate the image and then it falls down. Is it just me or is it a flaw in the algorithm?

Posted by zed  on  10/09  at  04:09 AM

As the text on the wiki page indicates, this is a known bug. On an ATI card everything looks OK, and that’s the platform I used for developing the demo. I see no good reason for this bug to appear with Nvidia hardware, and I have asked a question in the GLSL forum to try to sort it out. No response yet, though.

Posted by Stefan Gustavson  on  10/15  at  11:32 AM

Leave a comment

Commenting is not available in this weblog entry.

<< Back to main

Column Header
Column Footer