I’m currently working on a shader in which I want to repeat a mirrored texture. that works so far. my problem is that I would like to keep the resolution of each tile constant and I still have no idea how to do that. with my function, tiles are mirrored and tiled, but with the disadvantage that the overall resolution remains the same and therefore each tile has a worse resolution by the factor with which it is tiled.

Here my function:

```
vec2 scaledPos2D(vec2 uv, float scale) {
float frac = 1./scale;
return vec2(
frac - abs(mod(scale * uv.x, frac*2.)-frac),
frac - abs(mod(scale * uv.y, frac*2.)-frac)
);
}
```

My texture resolution: 256

If I now create 4 tiles, each tile only has a resolution of 128

tile 00 tile 01

tile 10 tile 11

But I want a fractal tiling. I want as many tiles as I want and each tile should keep the original resolution of 256