Texture seams issue

Started by
1 comment, last by James Trotter 18 years, 9 months ago
Hello, I am trying to use GL_CLAMP/GL_CLAMP_TO_EDGE instead of GL_REPEAT to remove the seams between textures. Here is the result with GL_REPEAT: http://members.kabsi.at/devp/img2.jpg and with GL_CLAMP_TO_EDGE: http://members.kabsi.at/devp/img1.jpg Why does the "clamped"-one look so strange, and how can I fix this? thanks,
Advertisement
Probably your texture coordinates are larger than 1.0. Just discard everything before decimal point
GL_CLAMP and GL_CLAMP_TO_EDGE will clamp your texture coordinates to the [0.0, 1.0] range. Thus you cannot repeat a texture by supplying a texture coordinates with values greater than 1.0. It seems that this is just what you're trying to do. Take a look at your texture coordinates, and make sure that they're in the [0.0, 1.0] range.

The OpenGL programming guide has an excellent part about repeating and clamping textures. Look at Chapter 9: Texture Mapping

This topic is closed to new replies.

Advertisement