I’m using the following fragment shader. It is quite simple, just supposed to apply the texture on a polygon, but clamping the texture coordinates. It is very bizzare I get a line where my incoming texture coordinates are a multiple of 1. It’s not something in my texture itself because I then clamp the texture coordinates before I pass them to the texture lookup. Seems like something is weird using “fract”. I tried recoding the fract using mod or floor, but I always get the same artifact on my FX 6800 (tried multiple drivers)
Any idea?
uniform sampler2D nTextIdx0;
void main(void)
{
vec2 texCoord = fract(gl_TexCoord[0].xy);
texCoord = clamp(texCoord, 0.15,0.45);
gl_FragColor = texture2D(nTextIdx0, texCoord);
}