#version 450

layout(location = 0) in vec4 fragColor;
layout(location = 0) out vec4 outColor;

void main() {
    vec2 uv = gl_PointCoord * 2.0 - 1.0;
    float d = dot(uv, uv);

    if (d > 1.0) {
        discard;
    }

    float falloff = pow(1.0 - d, 2.0);

    outColor = vec4(fragColor.rgb * falloff, fragColor.a * falloff);
}