Debian Codegraph @

experimental/dist_field/README

raw
1 Basic implementation of the paper "Improved Alpha-Tested Magnification for
2 Vector Textures and Special Effects" by Chris Green, Valve.
3 http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf
4
5 Run genfield.py over a large monochrome image (at least 1024x1024) to generate
6 the compressed distance field image. e.g.
7
8 python genfield.py --size=64 py.png
9
10 Produces py.df.png (or use -o to specify output file).
11
12 Then preview the alpha-tested rendering using renderfield.py
13
14 python renderfield.py py.df.png
15
16 Following keys modify the shader operation:
17
18 A Toggle antialiasing
19 B Toggle bidirectional (see below)
20 O Toggle outline
21 G Toggle glow
22 , Decrease outline/glow
23 . Increase outline/glow
24
25 Bidirectional fields (see last page of Valve paper) can be generated by
26 passing -b to genfield.py, and enabled in renderfield.py by pressing 'B'.
27 Bidirectional field rendering requires shader, and seems to look worse in
28 every case. Glow, outline and AA have not (yet) been implemented for
29 bidirectional.