Implement mipmaps for non-power-of-two (NPOT) textures