/[libvob]/libvob/org/nongnu/libvob/demo/fpfont.py
ViewVC logotype

Diff of /libvob/org/nongnu/libvob/demo/fpfont.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by tjl, Wed Apr 9 11:51:59 2003 UTC revision 1.14 by tjl, Wed Apr 9 13:03:27 2003 UTC
# Line 105  MUL R6, R6, 512; Line 105  MUL R6, R6, 512;
105    
106  # R6 = texels per pixel  # R6 = texels per pixel
107    
108  TEX R0, f[TEX0].xyzw, TEX0, 2D;  
109  MAD R0, R0.w, 256, R0.x;  #TEX R0, R10, TEX0, 2D;
110    #MUL R0, R0, 16;
111    # MAD R11,
112    # MAD R0, R0.w, 256, R0.x;
113  # MAD R0, R0.x, 256, R0.w;  # MAD R0, R0.x, 256, R0.w;
114    
115    # Sample in an X pattern.
116    
117    DEFINE rad=.2;
118    
119    MAD R11, rad, R8, R10;
120    MAD R11, rad, R9, R10;
121    TEX R12, R11, TEX0, 2D;
122    MAD R1.x, R12.w, 256, R12.x;
123    
124    MAD R11, -rad, R8, R10;
125    MAD R11, -rad, R9, R10;
126    TEX R12, R11, TEX0, 2D;
127    MAD R1.y, R12.w, 256, R12.x;
128    
129    MAD R11, rad, R8, R10;
130    MAD R11, -rad, R9, R10;
131    TEX R12, R11, TEX0, 2D;
132    MAD R1.z, R12.w, 256, R12.x;
133    
134    MAD R11, -rad, R8, R10;
135    MAD R11, rad, R9, R10;
136    TEX R12, R11, TEX0, 2D;
137    MAD R1.w, R12.w, 256, R12.x;
138    
139    # Scale up by 256 and down by 16
140    MUL R1, R1, 16;
141    
142    # Now, R1 contains the 4 texel lengths
143    # of the edges from the 4 points.
144    
145  # Scale  # Scale
 MUL R0, R0, .0625;  
 MUL R1, R0, 256;  
146    
147  # Calculate half the width - i.e. the radius  # Calculate half the width - i.e. the radius
148  MUL R6, R6, .5;  MUL R6, R6, .5;
149    
150    # Further scale down by half for the X sampling pattern
151    MUL R6, R6, .5;
152    
153  SLT R0, R1, R6;  SLT R0, R1, R6;
154    
155    # Then, what to do with this?
156    DP4 R0, R0, 1;
157    MUL R0, R0, .25;
158    
159    # SLE R0, R1, 0;
160    
161  # MUL R6, R6, .5;  # MUL R6, R6, .5;
162  #  #
163  # SLT R0.x, R1, R6;  # SLT R0.x, R1, R6;

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26