On Friday 04 February 2005 09:14, Lourens Veen wrote: > On Thursday 03 February 2005 11:21, Lourens Veen wrote: > > On Wednesday 02 February 2005 15:10, Timothy Miller wrote: > > > That sounds like a really neat idea. Mind you, if we can avoid using > > > multipliers, that would be even better. As it is, I'm not sure we'll > > > have enough. > > > > What if we limit the values for the derivative to 4, 2, 1, 0.5, 0.25, > > etc.? Then we just store a shift count, and you only need a barrel > > shifter (or a shift register, but that would make it multiple cycle > > which is not good), and no multiplier at all. > > > > I've looked at the model for a bit, we are talking about the divide at > > line 720 of render.cpp right? And the input will be a normalised float > > with 1 bit sign, 8 bits exponent, and 16 bits mantissa? > > Replying to self, I've been coding and measuring for a bit, and I've > found out that a 10-bit LUT with 16-bit values will give us 15 bits of > precision with linear interpolation, and 9 bits without. > > Of course, that requires two RAM reads per reciprocal, and we only have > two ports, so for two pixels we need something else. I haven't tried yet, > but I think that I can get 13 bits by using a 14/4 bit value/difference > table, while using only one read per reciprocal. It would still require a > multiplier. > > What kind of precision is acceptable for this?
Hi Lourens, My kneejerk reaction is that 16 bits is required for the perspective divide. I did experiment with 16/8 divides at one point in software but never managed to produce stable results. Floating point output might have helped there, but I really expect 8 bit divide precision to cause a lot of easily visible artifacts. 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)
