I have a seamless Texture2D with GL_REPEAT and few triangles to which this texture is mapped correctly.
for each vertex in these triangles i'm updating positionX to move this texture as parallax background and it gets large values.
u = positionX/texture_width; v = positionY/texture_height;
Problem is that when u <~50 , everything works fine, texture is repeating, but after it reach some limit it starts to display something like lower resolution texture and after every X distance it's getting worse.
How could I properly limit this u & v to smaller values ?
I have tried simply for each vertex to limit u this way
float pWsp = positionX/(pTextureWidth);
float pResult = pWsp - ((int)pWsp);
return pResult;
but every time texture ends is reversed int X which gives me strange result