• entries
    316
  • comments
    485
  • views
    321582

Sub-Pixel Accuracy

Sign in to follow this  
Jason Z

211 views

Subpixel Accuracy
In 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.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now