#version 330 core

in vec2 fTexCoord;
in vec4 fColor;

out vec4 fragColor;

uniform vec4 border;

void main()
{
	float dist = distance(vec2(0.5), texCoord);
	if(dist > 0.5)
		discard;
	
	if(dist < 0.4)
		fragColor = fColor;
	else if(dist < 0.45)
		fragColor = mix(fColor, border, (dist-0.4)/0.05);	
	else
	{
		fragColor = border;
		fragColor.a *= 1.0-(dist-0.45)/0.05;	
	}
}
