#version 330 core

in vec2 UV;
in vec3 COLOR;

out vec4 color;
out float opacity;

uniform sampler2D SAMPLER;

void main()
{
    vec4 c = texture(SAMPLER, UV);
	color.rgb = c.rgb * COLOR;
    color.a = step(1.0 - c.a, 0.5);
}