
in lowp vec4 colorV;
out vec4 fragColor;
in mediump vec2 pos;

uniform mediump vec2 maskCentre;
uniform mediump vec2 maskSize;
uniform mediump float maskRadius;

float roundedBoxSDF(vec2 CenterPosition, vec2 Size, float Radius) {
	return length(max(abs(CenterPosition) - Size + Radius, 0.0)) - Radius;
}
void main(void) {
	fragColor	= colorV;
	fragColor.a = 1.f - roundedBoxSDF(pos - maskCentre, maskSize, maskRadius);
}