       // This is the conversion factor for transformations and device pixel scaling.
       float pixelsPerFragment = length(fwidth(localPos.xy));
       oFragColor = get_fragment_color(distanceFromMixLine, pixelsPerFragment);
-      draw_antialiased_solid_border_corner(localPos, pixelsPerFragment);
+
+      if (vRadii.x > 0.0) {
+        float alpha = alpha_for_solid_border_corner(localPos, vRadii.z, vRadii.x, pixelsPerFragment);
+        oFragColor *= vec4(1, 1, 1, alpha);
+      }
+
       break;
     }
     default:

  // it between the limits accepted by `mix`.
  float colorMix = min(max(distanceFromMixLine / pixelsPerFragment, -0.5), 0.5) + 0.5;
  return mix(vHorizontalColor, vVerticalColor, colorMix);
}

#ifdef WR_FEATURE_TRANSFORM

            draw_solid_border(vDistanceFromMixLine, local_pos);
            break;
        case BORDER_STYLE_DOUBLE:
            draw_double_border(local_pos);
            break;
        default:
            discard;
