#version 460

#extension GL_EXT_nonuniform_qualifier : require

layout (location=0) in vec4 color;
layout (location=1) in vec2 tex_cord;
layout (location=2) flat in uint tex_ind;

layout (location=0) out vec4 fin_color;

layout (binding=0) uniform sampler2D images[];

void main(){
    float I = texture(images[nonuniformEXT(tex_ind)], tex_cord).r;
    fin_color = vec4(color.rgb, color.a * I);
}
