I am using a texture atlas which I have a made by stitching 2 identically sized images together side-by-side. When I modify the texture co-ordinates I do the following in this order:
if(texCoordx>1) texCoordx = texCoordx % 1
- So one texture doesn't leak into another.if(texCoordx<0) texCoordx = 1 + texCoordx
- Again, so one texture doesn't leak into another.- Scale the texture co-ordinates by 0.5.
- Add 0.5 if wanting to draw the texture on the right.
This works out mostly fine, however, I seem to get 'smudging' at the edges where the texture s co-ordinates approach 1 and 0. It looks like it is being smudged along the t axis. I have attached a screenshot.
I know that there was one answer found here but it only slightly narrows the smudging. I'm using my own shader, but it's not doing any modification of texture co-ordinates. I am also enabling GL_REPEAT
. Does anybody know any possible causes/solutions?