export declare const fragmentShaderSource = "\nprecision mediump float;\n\nvarying float v_border;\nvarying float v_inactive;\nvarying vec4 v_color;\nvarying vec4 v_texture;\n\nuniform sampler2D u_atlas;\n\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\nconst float radius = 0.5;\n\n\n// convert color to pale gray\nvec4 toPaleGrayscale(in vec4 color, float paleFactor)\n{\n  vec4 white = vec4(1.0, 1.0, 1.0, 1.0);\n  vec4 paleColor = mix(color, white, paleFactor);\n\n  float average = (paleColor.r + paleColor.g + paleColor.b) / 3.0;\n  return vec4(average, average, average, 1.0);\n}\n\nvoid main(void) {\n    vec4 color;\n\n    // set texel as color of point\n    if (v_texture.w > 0.0) {\n        vec4 texel = texture2D(u_atlas, v_texture.xy + gl_PointCoord * v_texture.zw, -1.0);\n        color = vec4(mix(v_color, texel, texel.a).rgb, max(texel.a, v_color.a));\n    } else {\n        color = v_color;\n    }\n\n    // convert color to gray\n    if (v_inactive > 0.0) {\n        color = toPaleGrayscale(color, 0.5);\n    }\n\n    // distance from point to center of node\n    float dist = length(gl_PointCoord - vec2(0.5, 0.5));\n\n    if (dist < radius - v_border)   // points inside node\n        gl_FragColor = color;\n    else if (dist < radius)         // border of node\n        gl_FragColor = mix(transparent, color, (radius - dist) / v_border);\n    else                            // points outside node\n        gl_FragColor = transparent;\n}";
