OpenGL texture atlas bleeding

前端 未结 5 1875
滥情空心
滥情空心 2021-01-01 00:30

I\'m trying to draw a basic 2d ground mesh made up of smaller tiles from a texture atlas (note the 1 pixel transparent border):

5条回答
  •  独厮守ぢ
    2021-01-01 01:01

    Your border shouldn't be transparent, but rather the pixels from the opposing side of each subtexture. For example the border on the right hand side of each sub-texture should be a copy of the left-most line of pixels, i.e. the pixels that it would wrap around to.

    That is how you "cheat" wrapping for the texture sampler on the borders.

提交回复
热议问题