28 lines
488 B
GLSL
28 lines
488 B
GLSL
#version 330
|
|
in vec2 coords;
|
|
|
|
out vec4 color;
|
|
|
|
in float radius;
|
|
in vec4 fcolor;
|
|
in vec2 pos;
|
|
|
|
void main()
|
|
{
|
|
int thickness = 1;
|
|
bool fill = false;
|
|
|
|
// int tt = thickness + 1;
|
|
float R1 = 1.f;
|
|
// float R2 = 1.f - (thickness*zoom / radius);
|
|
float R2 = 1.f - (thickness/radius);
|
|
float dist = sqrt(dot(coords, coords));
|
|
|
|
if (dist >= R2 && dist <= R1)
|
|
color = fcolor;
|
|
else if (dist < R2)
|
|
color = vec4(fcolor.xyz, 0.1f);
|
|
else
|
|
discard;
|
|
}
|