On Monday 31 January 2005 18:01, Daniel Phillips wrote:
> Of course.  However, this is just an optimized way of dividing several 
> parameters.  For perspective interpolation you have to interpolate the 
> inverses of the parameters, and divide by the interpolated inverse of 
> W.  This does not appear to be handled correctly in the model.

The formula for perspective correct interpolation is:

f = F(t) / M(t), where F(t) = (1-t)f_0/w_0 + tf_1/w_1 and
M(t) = (1-t)/w_0 + t/w_1

Both F and M can be linear interpolated, and before the actual fragment 
pipeline is entered, divide F/M.
This is exactly what the software model does already, only that M is called 
W.

There's really nothing wrong with perspective correction in the software 
model as far as I can see, the problem lies with Z as I explained in the 
other thread ("Depth buffer"). Nobody has taken up the challenge of 
figuring out how to do orthographic projection correctly with the current 
software model (I'm saying it can't be done, because where OpenGL specifies 
two independent variables, the software model only has one).

cu,
Nicolai

Attachment: pgpTlQqYXZ890.pgp
Description: PGP signature

_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)

Reply via email to