             );
             float d = min(-d_radii_a, d_radii_b);
             float alpha = distance_aa(aa_range, d);
-            return alpha * color[0];
+            return alpha * color0;
         }
         case BORDER_STYLE_GROOVE:
         case BORDER_STYLE_RIDGE: {

        color0 = evaluate_color_for_style_in_edge(
            vPos,
            style.x,
            vColor0,
            aa_range,
            edge_axis.x
        );
        color1 = evaluate_color_for_style_in_edge(
            vPos,
            style.y,
            vColor1,
            aa_range,
            edge_axis.y
        );

            }
            float d = min(d0, d1);
            float alpha = distance_aa(aa_range, d);
            return alpha * color0;
        }
        case BORDER_STYLE_GROOVE:
        case BORDER_STYLE_RIDGE: {
            float ref = vEdgeReference[edge_axis] + vPartialWidths[edge_axis+2];
            float d = pos[edge_axis] - ref;
            float alpha = distance_aa(aa_range, d);
            return mix(color0, color1, alpha);
        }
        default:
            break;
    }

    return color0;
}

void main(void) {
