OpenGL anisotropic filters

hi

I just don’t know, how to best setup anisotropic filters. From common games I know these filters as an alternative to bilinear or trilinear filters. In OpenGL it doesn’t seem to be an alternative, but it is perfectly possible to setup the necessary settings while bilinear or trilinear filters are activated, too. And additionally the anisotropic filters settings don’t have an on/off setting. The most off’ish setting would be to use a float value of zero for the filter GL_TEXTURE_MAX_ANISOTROPY_EXT (the default seems to be 0).

How is it generally done? Will anisotropic filters work best, if I use GL_NEAREST for the TEXTURE_ENV mag/min filters? Does it make any sense to use something different than GL_NEAREST in combination with anisotropic filters? Is it sufficient to use a value of zero for GL_TEXTURE_MAX_ANISOTROPY_EXT to switch anisotropic filters off? Is it true, that the anisotropic filters are enabled by default at 16x? What values actually make sense? (Only 0, 1, 2, 4 ,8, 16? Or are there other valid values?).

Thanks in advance.

Marvin

PS: btw. Shouldn’t there be a common OpenGL-forum (or board, as SMF mistakenly callls them) to discuss about OpenGL in general? I didn’t know, if it was ok, to post in the most general forum, but I didn’t find a more specific, but still matching one.

Anisotropic filtering uses trapezoid instead of rectangle when sampling from textures, so it samples more texels on part where more pixels are actually visible on screen and vice versa. I think it can work with any filtering (at least in theory), but it makes most sense for GL_LINEAR_MIPMAP_LINEAR (aka. trilinear filtering). To make good efect at least 8 is good value, new cards have 16 maximum. (8 was limit for GF4 Ti, 16 is on GF6).

OK, thanks. Than I think, I will provide ANISOTROPIC_2, ANISOTROPIC_4, ANISOTROPIC_8 and ANISOTROPIC_16 as alternative filter modes to the currently existing POINT, BILINEAR and TRILINEAR. And if an ANISOTROPIC_X value is used, trilinear will be used with it. the other combinations don’t make too much sense then.

Marvin