View Full Version : Anisotropic filtering and manual mipmap generation

11-14-2010, 01:06 PM
Afaik anisotropic filtering requires not only 4x scaled down mipmaps of original image (that is, from 128x128 it would be 64x64, 32x32, ..., 1x1) but also other sizes, like 128x16 (in case of 8x anisotropy). My question is whether I have to generate such additional mipmaps manually?
To generate mipmaps glTexImage is used that way (more or less):

glTexImage2D(GL_TEXTURE_2D, 16, 16, ...);
glTexImage2D(GL_TEXTURE_2D, 8, 8, ...);
glTexImage2D(GL_TEXTURE_2D, 1, 1, ...);

If I want to use anisotropic filtering, should I specify additional:

glTexImage2D(GL_TEXTURE_2D, 16, 8, ...);
glTexImage2D(GL_TEXTURE_2D, 16, 4, ...);


11-14-2010, 01:15 PM
Actually no.
No sure how it is done internally (probably number of samples dynamically done according to texcoord derivative), but on your side you only have to provide 4x scaled down mipmaps.

11-14-2010, 01:36 PM
That's great. Thanks!