#include "version.sh"

in lowp vec4 color_f;
in mediump vec2 uv_f;
in mediump float radius1_f;	// The radius value for 1 (radius value for 0 is 0.5).

void main ()
{
    // high performance with small round inaccurate.

    // mediump vec2 dif = uv_f;
    // mediump float squaredis = dot(dif, dif);
    // mediump float alpha = smoothstep(radius1_f * radius1_f, 0.5 * 0.5, squaredis);
    
	mediump float dis = distance(uv_f, vec2(0.0));
	mediump float alpha = smoothstep(radius1_f, 0.5, dis);
    gl_FragColor = color_f * (1.0 - alpha);
}
