Sub-Pixel Accuracy

Published May 09, 2007
Advertisement
Subpixel AccuracyIn my last post, Deyja mentioned that I didn't account for subpixel accuracy in my texture coordinate perspective interpolation. After looking into it, he is completely correct - at the edges of a triangle, the pixels that get selected don't fall exactly on the triangle's edge. There is always some overlap, but the position gets truncated to an integer value, while the interpolated attributes don't get modified. So to achieve subpixel accuracy, you need to fix up the attributes. Its a simple concept, but not so simple to get right on a perspective correct interpolation scheme.

I tried for about a day to figure out what the best way to do this was, and decided to look around on the net for some articles. I came across this site and was immediately smiling. Chris Hecker apparently wrote several articles back in the 1995 time frame for Game Developer magazine about texture mapping which you can find here. It appears to be exactly what I needed, with a very thorough explanation. I'm going to read through all of these articles, then I'll likely update the rasterizer with the improved subpixel accurate algorithm.
Previous Entry Performance updates
Next Entry Subpixel Accurate!
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement