[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] Signed distance fields: distance from any point to the glyph
From: |
Nicolas Rougier |
Subject: |
[ft-devel] Signed distance fields: distance from any point to the glyph contours |
Date: |
Tue, 30 Oct 2012 11:56:17 +0100 |
Hi,
One technics for rendering scalable text in OpenGL is the use of signed
distance fields (signed distance to the glyph outlines) that are stored in a
texture. Results are not perfect but acceptable in most cases. The way to
compute such distance fields in freetype-gl
(http://code.google.com/p/freetype-gl/) is to generate the bitmap of the glyph
at high resolution, compute the (approximated) distance field on these bitmap
and then downscale it. Of course, we lost a lot of precision (and time) in the
operation.
My question relates to a more direct way to compute the signed distance and to
know if anyone has already coded it by any chance ? Said differently, is there
a quick way to compute the shortest signed distance from any point (x,y) to the
glyph contours ?
Nicolas
- [ft-devel] Signed distance fields: distance from any point to the glyph contours,
Nicolas Rougier <=