mine the repeated texture coord, anchoring to the top
    vec2 flipped_position = vec2(local_position.x, size.y - local_position.y);
    vec2 texture_position = texture_source_position + mod(flipped_position, texture_source_size);
    vec2 uv = texture_position / texture_size;
    uv.y = 1 - uv.y;
#endif

    color *= texture(tex, uv);
#endif

    frag_color = color;
}
