Could someone help me with creating a fragment shader producing a tiled fractal noise. currently I'm using random noise texture and sample it with diferent resolution and sum the result. What I have to add to make it tileable.
uniform float time;
uniform sampler2D u_texture;
varying vec2 v_texCoords;
float noisep(in vec2 p, in float scale) {
return texture2D(u_texture, p / scale + vec2(0.0, time * 0.01)) / 4.0;
}
void main(void) {
vec2 uv = v_texCoords * vec2(0.7, 1.0);
float scale = 1.0;
float col = 0.0;
for(int i = 0; i < 6; i++) {
col += noisep(uv, scale);
scale += 1.0;
}
gl_FragColor = vec4(col, col, col, 1);
}