#version 330 core

in vec2 UV;

out vec4 color;

uniform sampler2D fontMap;
uniform float alpha;

void main()
{
//	color = texture(fontMap, UV);
	float breakPoint = 0.5;
	vec4 tempColor = texture(fontMap, UV);

	if(tempColor.a < alpha)
	{
		color = tempColor;
	}
//	else if(alpha > breakPoint)
//	{
//		color.rgb = tempColor.rgb;
//		color.a = 1.0-alpha;
//	}
	else
	{
		color.rgb = tempColor.rgb;
		color.a = alpha;
	}
}