#version 330 core

in vec2 v_texcoord;
in vec4 v_fg_color;

out vec4 frag_color;

uniform sampler2D u_atlas;

void main() {
    float alpha = texture(u_atlas, v_texcoord).r;
    frag_color = vec4(v_fg_color.rgb, v_fg_color.a * alpha);
}
