I was experimenting with texture-arrays and i got a weird seam between the texture-array pages i was rendering.
Basically i’m rendering a square polygon with texture coordinates ranging from 0,0 to 4,4.
The idea was to use the integral part of the coordinates to calculate the index of the texture-array and the fractional part for the texture-array page.
If i use this in my glsl:
gl_FragColor = texture2DArray(tex, vec3(fract(TexCoord), 0));
I get a seam:
Yet if i remove the fract:
gl_FragColor = texture2DArray(tex, vec3(TexCoord, 0));
And use GL_REPEAT wrapping, the seam dissappears:
This is the first time i used texture-arrays…
Am i missing something?
Why would that seam appear?
Wouldn’t GL_REPEAT basically be doing the same thing under the hood?
Fract is just the first step in what i’m planning to do (messing around with virtual texture stuff), so i can’t use the GL_REPEAT thing.
Edit: Nvidia hardware btw. (just in case it’s a driver bug.)