     case PST_TOP_LEFT:
     case PST_TOP_RIGHT:
     case PST_BOTTOM_LEFT:
-    case PST_BOTTOM_RIGHT:
-      oFragColor = mix(vHorizontalColor, vVerticalColor, step(0.0, vF));
-      draw_antialiased_solid_border_corner(localPos);
-      break;
+    case PST_BOTTOM_RIGHT: {
+      // This is the conversion factor for transformations and device pixel scaling.
+      float pixelsPerFragment = length(fwidth(localPos.xy));
+      oFragColor = get_fragment_color(vF, pixelsPerFragment);
+      draw_antialiased_solid_border_corner(localPos, pixelsPerFragment);
+      break;
+    }
     default:
       oFragColor = vHorizontalColor;
       discard_pixels_in_rounded_borders(localPos);

  }
}

void draw_antialiased_solid_border_corner(vec2 local_pos) {
  if (vRadii.x <= 0.0) {
    return;
  }

  // This is the conversion factor for transformations and device pixel scaling.
  float pixelsPerFragment = length(fwidth(local_pos.xy));

  float distanceFromRef = distance(vRefPoint, local_pos);


  // And 0.0 for the blank part.
  float should_fill = in_first_part + in_third_part;

  // This is the conversion factor for transformations and device pixel scaling.
  float pixels_per_fragment = length(fwidth(vLocalPos.xy));
  vec4 white = vec4(1.0, 1.0, 1.0, 1.0);
  return mix(white, get_fragment_color(vF, pixels_per_fragment), should_fill);
}

vec4 draw_double_edge_vertical() {
