High Quality Anti-Aliased Real Time Contours in OpenGL

High Quality Anti-Aliased Real Time Contour in OpenGL



Here is a method to get nice anti aliased contours (useful for displaying text for example) without the need for a big binary alpha map (like 4096×4096).

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.

A demo with full source code (OpenGL + GLSL) is available HERE.

And the method seems to work rather well:

High Quality Anti-Aliased Real Time Contour in OpenGL

High Quality Anti-Aliased Real Time Contour in OpenGL

High Quality Anti-Aliased Real Time Contour in OpenGL

[via]




Geeks3D.com

↑ Grab this Headline Animator