Jump to content
  • Advertisement
Sign in to follow this  
Cone83

OpenGL Texture borders

This topic is 4848 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

I have a very huge texture which is too large for many graphics cards. That's why I wanted to split it into multiple textures and then tile tile it togeter. At the border of two tiles you could notice the change of the texture because I am using linear filtering. That's why I decided to add a 1 pixel texture border to each tile texture. Now I've created the texture border but strangely OpenGL always uses a completely black border for filtering. Setting GL_TEXTURE_BORDER_COLOR to a different color doesn't change anything, so I've no idea from where it takes the black color. Any hints welcome.

Share this post


Link to post
Share on other sites
Advertisement
ideally your split up textures would have one row of pixels along the edge which is exactly the same as their neighbor 'tile' on that side.
Then when specifying texcoords for the edges, give a coord that is in the center of the edge pixels.
eg. if your 'tile' size is 128x128, the low end texcoord would be (0.5/128), and upper end would be 1 - (0.5/128)

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!