in vec2 uv;
in vec2 uvn;

out vec4 C;


uniform int textures_cnt;
uniform int g_tex_a;
uniform int g_tex_b;
uniform int g_tex_c;
uniform int g_tex_d;
uniform int g_tex_e;


void main(){
    int[] tex_array = int[](
        g_tex_a,
        g_tex_b,
        g_tex_c,
        g_tex_d,
        g_tex_e
    );

    int idx = clamp(int(mouse_uv.x * float(textures_cnt)), 0, textures_cnt - 1);

    vec4 samp = texture(
        textures[tex_array[idx]],
        uv
    );

    C = samp;
    C.w = 1.0;
}
