     vec4 color0, color1;
 
     int segment = vConfig.x;
-    int style0 = vConfig.y & 0xffff;
-    int style1 = vConfig.y >> 16;
+    ivec2 style = ivec2(vConfig.y & 0xffff, vConfig.y >> 16);
     ivec2 edge_axis = ivec2(vConfig.z & 0xffff, vConfig.z >> 16);
 
     float mix_factor = 0.0;

        );
        color1 = evaluate_color_for_style_in_corner(
            clip_relative_pos,
            style1,
            vColor1,
            vClipRadii,
            mix_factor,

    return vec4(clamp(color.rgb * f, vec3(0.0), vec3(color.a)), color.a);
}

vec4[2] get_colors_for_side(vec4 color, int style) {
    vec4 result[2];
    const vec2 f = vec2(1.3, 0.7);

    switch (style) {
        case BORDER_STYLE_GROOVE:
            result[0] = mod_color(color, f.x);
            result[1] = mod_color(color, f.y);
            break;
        case BORDER_STYLE_RIDGE:
            result[0] = mod_color(color, f.y);
            result[1] = mod_color(color, f.x);
            break;
        default:
            result[0] = color;
            result[1] = color;
            break;
    }

    return result;
}

void main(void) {
    int segment = aFlags & 0xff;
    int style0 = (aFlags >> 8) & 0xff;
