On Tuesday 01 February 2005 13:55, Timothy Miller wrote:
Correct me if I'm wrong, but "normalized device coordinates" have been projected but not scaled, right?
Rotated and projected so that all view planes are orthogonal, and scaled to [-1, +1] in all dimensions I think.
I wasn't sure if negative Z's were allowed or not.
Therein lies a problem. Since the reciprocal isn't precise (we use only 10 mantissa bits when computing it)
Hmm, I thought we had 18 bits of precision readily available. Is this a consequence of using linear interpolation for the divide?
It's a consequence of using a lookup table with only 10 address bits for the reciprocal.
But the linear interpolation then adds some more bits, I thought.
It adds more logic, for sure. The idea is to use the 10 highest bits of the mantissa to look up an entry from the table, plus the next one. Then you use the lower 6 bits as a linear interpolation factor between them.
The problem is that we don't want to use up another RAM block, and we don't want to spare the multipliers for the interpolation.
My guess is that in a perfect world we should round down, but saving a few gates is enough excuse for rounding up. Fortunately it's a FPGA, so there's hardly any penalty for guessing wrong the first time.
Your GUESS? Is there anything which states it definitively?
I'm waiting for an OpenGL lawyer out there to speak up. I know they're lurking ;-)
What we need is someone who's a core Mesa member. There are certain big-wigs who seem to be keeping their distance. Notice that RMS and ESR are silent. Keith Packard hasn't said anything either, to my knowledge. Linus stayed out of the conversation on LKML.
Another thing that I'm going to change is that the X values are going to be fixed-point. It won't hurt anything (on the contrary!), and it'll make the logic lots simpler. Additionally, it makes it easier to round 0.5 down. It's still more logic but not horribly bad.
That is for sure the right thing to do. Y should be fixed point too, IMHO.
Y is integer. The software is responsible for adjusting all other parameters to be correct. See the model source for how that is done.
BTW, how do you do "0.5 rounds down" in software? Quick and dirty rounding function is floor(x+0.5) which rounds UP for 0.5. Is there a simple way to do it in software? ceil(x-0.5) ???
_______________________________________________ Open-graphics mailing list [email protected] http://lists.duskglow.com/mailman/listinfo/open-graphics List service provided by Duskglow Consulting, LLC (www.duskglow.com)
