Screen Tiling
Shader that repeatedly tiles the screen based on the given numbers of rows and clomuns
Apply on a ColorRect with Full Rect anchor preset across the screen
Shader code
shader_type canvas_item;
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_nearest;
uniform int rows = 2;
uniform int columns = 2;
void fragment() {
vec2 grid_uv = vec2((UV.x - floor(UV.x/(1.0/float(rows))) * 1.0/float(rows))*float(rows), (UV.y - floor(UV.y/(1.0/float(columns))) * 1.0/float(columns)) * float(columns));
vec4 text = texture(SCREEN_TEXTURE, grid_uv);
COLOR = text;
}
the texture keeps in black color