Skip to main content
gamedev.net
🔒 Locked

Texture borders

Started by Cone83 0 replies 450+ views
Original Post
Cone83
Cone83
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.
zppz
zppz
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)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.