Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

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);
share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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