Skip to main content
gamedev.net
🔒 Locked

Texture mapping question...

Started by simon_brown75 Jul 5, 2000 at 12:01 PM 0 replies 250+ views
Original Post
simon_brown75
simon_brown75
Ok, I''m currently converting a "perfect" texture mapping routine to one that only corrects the perspective every nth pixel. I''ve got it working, and it''s pretty fast, over twice as fast as when every pixel is perspective corrected, but I''m getting an awful amount of "mess". I was looking at Quake (in software mode), which corrects only every 16 pixels, and it looks almost flawless, but when I correct every say, 8 pixels the whole thing just loses about 25% accuracy (rough estimate). I''m working out u/z v/z and 1/z at each vertex and interpolating them along the edges, all using floating point maths, then in my line drawing function I''m working out a correct value (again with floating point maths) for every nth pixel and then interpolating in-between using integers. Since I''m using integers when interpolating I''m obviously bit shifting to maintain accuracy. Is this the correct technique? Thanks, Simon.
simon_brown75
simon_brown75
Actually, i''ve figured it out, because i was storing the correct u,v''s as ints it was introducing an error.
Edit message doesn''t seem to be working so I can''t delete the thread. Moderator?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.