                                          float pixels_per_fragment) {
   float total_border_width = vRadii.x - vRadii.z;
   float one_third_width = total_border_width / 3.0;
+  float total_border_height = vRadii.y - vRadii.w;
+  float one_third_height = total_border_height / 3.0;
 
   // Contribution of the outer border segment.
   float alpha = alpha_for_solid_border_corner(local_pos,
-                                              vRadii.x - one_third_width,
-                                              vRadii.x,
+                                              vec2(vRadii.x - one_third_width,
+                                                   vRadii.y - one_third_height),
+                                              vec2(vRadii.x, vRadii.y),
                                               pixels_per_fragment);
 
   // Contribution of the inner border segment.
   alpha += alpha_for_solid_border_corner(local_pos,
-                                         vRadii.z,
-                                         vRadii.z + one_third_width,
+                                         vec2(vRadii.z, vRadii.w),
+                                         vec2(vRadii.z + one_third_width, vRadii.w + one_third_height),
                                          pixels_per_fragment);
   return get_fragment_color(distance_from_mix_line, pixels_per_fragment) * vec4(1.0, 1.0, 1.0, alpha);
 }

      oFragColor = get_fragment_color(distance_from_mix_line, pixels_per_fragment);
      if (vRadii.x > 0.0) {
        oFragColor *= vec4(1.0, 1.0, 1.0, alpha_for_solid_border_corner(local_pos,
                                                                  vRadii.z,
                                                                  vRadii.x,
                                                                  pixels_per_fragment));
      }


      oFragColor = get_fragment_color(distanceFromMixLine, pixelsPerFragment);

      if (vRadii.x > 0.0) {
        float alpha = alpha_for_solid_border_corner(localPos, vRadii.zw, vRadii.xy, pixelsPerFragment);
        oFragColor *= vec4(1.0, 1.0, 1.0, alpha);
      }

