Nicolai Haehnle wrote:
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.

I think the suggested optimization was to do some linear interpolation AFTER perspective divide. This would save on multipliers and other logic.


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).

Are you talking about Z and W or are you talking about W and Q?

Z and W can be easily interconverted. Plus we can do correct perspective correction (is this what you're calling 'orthographic'?) It's projective textures that we can't do (because we don't have Q).

_______________________________________________
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