#version 120
#ifdef GL_ARB_shading_language_420pack
#extension GL_ARB_shading_language_420pack : require
#endif
#extension GL_EXT_gpu_shader4 : require
#extension GL_ARB_shader_image_load_store : require
layout(early_fragment_tests) in;

varying vec2 centerpt;
varying float max_width;
varying float quant_fract;

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

