radar-gi/shaders/agg-fast-path.frag
2024-07-10 15:49:05 +08:00

22 lines
650 B
GLSL

// -----------------------------------------------------------------------------
// Copyright (c) 2009-2016 Nicolas P. Rougier. All rights reserved.
// Distributed under the (new) BSD License.
// -----------------------------------------------------------------------------
#include "antialias/antialias.glsl"
// Varyings
// ------------------------------------
in vec4 v_color;
in float v_distance;
in float v_linewidth;
in float v_antialias;
// Main
// ------------------------------------
void main()
{
<viewport.clipping()>;
if (v_color.a == 0) { discard; }
gl_FragColor = stroke(v_distance, v_linewidth, v_antialias, v_color);
}