2
\$\begingroup\$

I produce a strip of quads with texture coordinates to represent a path.

My texture is tiled along these quads.

When the quad is drawn very small (on my integrated Intel chip) it draws distorted.

200KB gif of scene at different zooms

How can I avoid this?

\$\endgroup\$
5
\$\begingroup\$

Try anisotropic filtering. In opengl it should be enabled like this:

GLfloat largest_supported_anisotropy; 
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &largest_supported_anisotropy); 
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, largest_supported_anisotropy);
\$\endgroup\$
5
\$\begingroup\$

As notabene said, anisotropic filtering will help, especially if you combine it with mip-mapping.

Why this works is explained perfectly in this wikipedia article: http://en.wikipedia.org/wiki/Anisotropic_filtering

"In layman's terms, anisotropic filtering retains the "sharpness" of a texture normally lost by MIP map texture's attempts to avoid aliasing. Anisotropic filtering can therefore be said to maintain crisp texture detail at all viewing orientations while providing fast anti-aliased texture filtering."

On how todo mipmapping in OpenGL see: http://www.swiftless.com/tutorials/opengl/mipmap_generation.html

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.