#version 420
layout(early_fragment_tests) in;

layout(location = 1) in vec2 centerpt;
layout(location = 2) in float max_width;
layout(location = 0) out vec4 color_out;
layout(location = 0) in float quant_fract;

void main()
{
    float centerpt_dist = length(centerpt - gl_FragCoord.xy);
    float width_ratio = 1.0 - (centerpt_dist / max_width);
    color_out = vec4(3.0, 0.0, 0.0, quant_fract * width_ratio);
}

