On Tuesday 01 February 2005 11:54, Timothy Miller wrote: > I've decided that I'm going to add the Z into the rasterizer.
I hope it's only a temporary decision. The payoff for working out all the little problems with using W instead of Z is pretty big. If there's an extra interpolant in the pipeline I'd far rather see it used for, say, color or alpha than Z. Have you thought about what to do when the number of interpolants required for a particular render state exceeds the number that can be practically hard coded? > The only thing that isn't clear to me is whether I need to store Z > (world) or Z/W (screen coordiates) in the depth buffer. Normalized device coordinates I think. > 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? > ...computing world Z (which is screenZ/(1/W)) would result in an > inaccurate value (not that it'll be all that great to begin with). So maybe 24 bit floating point is really what we want to store, which slightly complicates the Z compare but makes best use of the limited precision. > BTW, I think I'm going to go through the model and rename everything > called 'W' to 'M'. The reason is to eliminate some confusion. W > will always mean exactly the same thing which is [1+Zworld/d]. Since > we rasterize 1/W, I'll call it M. Comments? Yes, cute. > Another thing that I remain confused about is wrt rounding. If > something is exactly 0.5, do we round up or down? 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. Regards, Daniel _______________________________________________ Open-graphics mailing list [email protected] http://lists.duskglow.com/mailman/listinfo/open-graphics List service provided by Duskglow Consulting, LLC (www.duskglow.com)
