|
|
| Mipmaps |
|
someone972
Member #7,719
August 2006
|
I've got a few questions regarding mipmaps in an allegro application. Firstly is do I actually need mipmaps? I will be using stretch blit to shrink a 256x256 bitmap to as low as 32x32. If I do need mipmaps then what is the best way to produce one? Take the 9 pixels around a pixel and average them? I will be producing mip maps for 128x128, 64x64, and 32x32. EDIT: Nevermind. I implemented it to see how much of an improvement there was, and it looks nice. The method I used for creating them was to take the average of all the pixels that would be removed in the small version and averaging them. ______________________________________ |
|
Tobias Dammers
Member #2,604
August 2002
|
You don't need mipmaps, but when you significantly scale an image (or texture) down in size, they look better than a nearest-neighbor or linear interpolation approach. You calculate each mipmap level by averaging four pixels (not 9) from the next larger level. IIRC, OpenGL can automatically generate mipmaps for you if asked nicely. --- |
|
|