So I was fixing some textures today that were the wrong format. Really all this means is that they were taking too much space because I was storing an unneeded alpha channel in addition to red, green and blue.
I decided to go a little farther and make sure all the textures in the game were the ‘correct’ size. Modern GPUs (and all the old ones, back to the 3dfx Voodoo) use mip-maps – smaller and smaller versions of the same image to used to reduce aliasing and increase cache coherency when the texture is minified in the distance. By coloring each subsequent mip-map a different color and running the game, I can see which textures are actually using thier highest resolution mip level.
Plus it looks really cool.
In the picture above, red, yellow, green, blue, and cyan are the first five colors. From this i can see the trees in the foreground are green and the ones in the distance are blue. This means I can downsample the texture and still retain the same final image quality.
I know PC’s have gigabytes of memory now, but I come from game console programming where memory is precious. I saved about 25 megabytes with of memory with the format and size changes, while increasing the quality of ambient occlusion maps! Hoorah!