<commit_before>#version 400

in vec3 te_edge[];
in vec3 te_bary[];
in vec3 te_color[];

in vec2 te_tan_ab[];
in vec2 te_tan_bc[];
in vec2 te_tan_ca[];

in int te_do_fill[];

in vec3 te_stroke_color[];

out vec3 g_color;

uniform vec2 window_size;

layout(triangles) in;
layout(triangle_strip, max_vertices = 12) out;

int is_edge(vec3 bary1, vec3 bary2, vec3 edges) {
    if (edges.x > 0 && bary1.x <= 0.000000001 && bary2.x <= 0.000000001) { return 1; }
    else if (edges.y > 0 && bary1.y <= 0.000000001 && bary2.y <= 0.000000001) { return 2; }
    else if (edges.z > 0 && bary1.z <= 0.000000001 && bary2.z <= 0.000000001) { return 3; }
    else { return 0; }
}

void make_edge(vec2 p0, vec2 p1, float depth, vec2 tan0, vec2 tan1, vec2 thickness, vec3 color) {
    tan0 = normalize(tan0);
    vec2 perp0 = vec2(-tan0.y, tan0.x) * 2 * thickness;
    tan1 = normalize(tan1);
    vec2 perp1 = vec2(-tan1.y, tan1.x) * 2 * thickness;

    g_color = color;
    gl_Position = vec4(p0, depth, 1);
    EmitVertex();
    g_color = color;
    gl_Position = vec4(p0 + perp0, depth, 1);
    EmitVertex();
    g_color = color;
    gl_Position = vec4(p1, depth, 1);
    EmitVertex();
    g_color = color;
    gl_Position = vec4(p1 + perp1, depth, 1);
    EmitVertex();
    EndPrimitive();
}

void main() {
    vec3 v0 = gl_in[0].gl_Position.xyz;
    vec3 v1 = gl_in[1].gl_Position.xyz;
    vec3 v2 = gl_in[2].gl_Position.xyz;

    if (te_do_fill[0] > 0) {
        g_color = te_color[0];
        gl_Position = vec4(v0, 1);
        EmitVertex();

        g_color = te_color[1];
        gl_Position = vec4(v1, 1);
        EmitVertex();

        g_color = te_color[2];
        gl_Position = vec4(v2, 1);
        EmitVertex();

        EndPrimitive();<commit_msg>Revert "made the stroke strictly internal"<commit_after>#version 400

in vec3 te_edge[];
in vec3 te_bary[];
in vec3 te_color[];

in vec2 te_tan_ab[];
in vec2 te_tan_bc[];
in vec2 te_tan_ca[];

in int te_do_fill[];

in vec3 te_stroke_color[];

out vec3 g_color;

uniform vec2 window_size;

layout(triangles) in;
layout(triangle_strip, max_vertices = 12) out;

int is_edge(vec3 bary1, vec3 bary2, vec3 edges) {
    if (edges.x > 0 && bary1.x <= 0.000000001 && bary2.x <= 0.000000001) { return 1; }
    else if (edges.y > 0 && bary1.y <= 0.000000001 && bary2.y <= 0.000000001) { return 2; }
    else if (edges.z > 0 && bary1.z <= 0.000000001 && bary2.z <= 0.000000001) { return 3; }
    else { return 0; }
}

void make_edge(vec2 p0, vec2 p1, float depth, vec2 tan0, vec2 tan1, vec2 thickness, vec3 color) {
    tan0 = normalize(tan0);
    vec2 perp0 = vec2(-tan0.y, tan0.x) * thickness;
    tan1 = normalize(tan1);
    vec2 perp1 = vec2(-tan1.y, tan1.x) * thickness;

    g_color = color;
    gl_Position = vec4(p0 - perp0, depth, 1);
    EmitVertex();
    g_color = color;
    gl_Position = vec4(p0 + perp0, depth, 1);
    EmitVertex();
    g_color = color;
    gl_Position = vec4(p1 - perp1, depth, 1);
    EmitVertex();
    g_color = color;
    gl_Position = vec4(p1 + perp1, depth, 1);
    EmitVertex();
    EndPrimitive();
}

void main() {
    vec3 v0 = gl_in[0].gl_Position.xyz;
    vec3 v1 = gl_in[1].gl_Position.xyz;
    vec3 v2 = gl_in[2].gl_Position.xyz;

    if (te_do_fill[0] > 0) {
        g_color = te_color[0];
        gl_Position = vec4(v0, 1);
        EmitVertex();

        g_color = te_color[1];
        gl_Position = vec4(v1, 1);
        EmitVertex();

        g_color = te_color[2];
        gl_Position = vec4(v2, 1);
        EmitVertex();

        EndPrimitive();
{'fraction_non_alphanumeric': 0.1462999716472923, 'fraction_numerical': 0.08789339381910972, 'mean_word_length': 2.876923076923077, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 12, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7363866', 'n_tokens_mistral': 1584, 'n_tokens_neox': 1427, 'n_words': 348}