I would like to scroll a tile which is part of a texture atlas like it can be done with a single quad and texture wrap mode set to repeat.
Can this be done? I hope it's clear what I would like to achieve.
Here is my shader code which I use to sample tiles from my texture atlas, but I can't figure out how to do the wrapping so that one tile repeats itself over time.
uniform float time
void main() {
float texId = textureId/32.0;
vec2 tileOffset = vec2(fract(texId)*32.0,floor(texId));
vec2 offset = invTileCount * tileOffset;
vec2 texCord = fract(vUv) * invAtlasSize + offset;
vec4 texelColor = texture2D( uTex, texCord );
}