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.
How can I avoid this?
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.Sign up to join this community
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);
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