Jump to content
  • Advertisement
Sign in to follow this  
dnaxx

Texture seams issue

This topic is 4867 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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,

Share this post


Link to post
Share on other sites
Advertisement
Probably your texture coordinates are larger than 1.0. Just discard everything before decimal point

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!