I have a question which probably has an extremely simple answer, but I can't seem to find it. I have been making a software rasterizer and I wish to implement mipmapping. I can make the mipmaps no problem (I store an array of textures, the first texture being the original sized texture and the last being a 16x16 version of the texture). So with that said, how do I determine which mipmap to use? I tried taking the maximum z value and dividing it by the total number of mipmaps then determining the index closest to the z position of the center of the triangle; unfortunately this did not work:sad:. Am I on the right track or am I completely off course...?
Mipmapping
Started by dega512, Apr 10 2006 09:08 PM
2 replies to this topic
#1
Posted 10 April 2006 - 09:08 PM
#2
Posted 10 April 2006 - 09:35 PM
The way I do mipmapping, not sure if it's the right/best way but it seems to work fairly well is to use the area of the triangle on the screen and comparing that to the area the triangle takes up on the texture (precalculated at the same time as the normals and only needed for the original texture). If the screen triangle area is smaller than the texture triangle area then go to the next mipmap, the area of the triangle on the next mipmap is 1/4 of the one above.
#3
Posted 10 April 2006 - 10:30 PM
Here's an excellent article about mipmapping theory: Run-Time MIP-Map Filtering. :yes: It even explains fast per-pixel mipmapping.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












