Steph August 05, 1999, 03:22 AM 

For your software renderer, a simple way ( I think ) to do antialias :
if S1 is a span, S2 is the next span after S1 ( let say at the right of S1 ).
Z1 is the Z value at the right extremity of S1 P1 is the pixel at the right extremity of S1 Z2 is the Z value at the left extremity of S2 P2 is the pixel at the left extremity of S2
if Z1Z2>deltaZ then P1 need antialias
( deltaZ should be zero, but for precision error I think you should try some other values )
for each R,G,B value of P1, you can do : P1.R=(P1.R+P2.R)*0.5; P1.G=(P1.G+P2.G)*0.5; P1.B=(P1.B+P2.B)*0.5;
If you want to antialias P1 and P2, you can do something like that:
Ptemp=P1;
P1.R=(P1.R*3.0+P2.R)*0.25; P1.G=(P1.G*3.0+P2.G)*0.25; P1.B=(P1.B*3.0+P2.B)*0.25;
P2.R=(Ptemp.R+P2.R*3.0)*0.25; P2.G=(Ptemp.G+P2.G*3.0)*0.25; P2.B=(Ptemp.B+P2.B*3.0)*0.25;
Steph
Colas wrote: >>the latest feature from 3dfx is the Tbuffer >> >>what is T buffer (tile buffer), how to use it ?, what value it contain ? >> >>i want to add edge antialiasing in my software engine >>i have a span buffer, so i should compute a antialiased pixel at the extremity >>of each spans . but how should i compute the right colour ? what rule should i apply ? >> >>ideas: i store for each extremities of the span if it`s in foreground >>if yes i compute the antialiased colour for this span`extremity but is this right ? >>i need a good formulae to compute the colour >> >> >>thanx all >> >>Colas
