overlays/sdf: Avoid 0-height inner boxes for switch capsule

- Can introduce dfdx/dfdy discontinuities on the midline as the distance changes direction
- The seams can sometimes become visible if a border is applied on some GPUs
This commit is contained in:
kd-11 2026-03-24 20:48:30 +03:00 committed by kd-11
parent 18bd6d681e
commit 86b7ea6bf3

View File

@ -99,7 +99,7 @@ namespace rsx::overlays
ellipse_part->set_size(dim * 2, dim);
ellipse_part->set_padding(1);
ellipse_part->set_pos(0, 0);
ellipse_part->border_radius = (dim - 2) / 2;
ellipse_part->border_radius = (dim - 4) / 2; // Avoid perfect capsule shape since we want a border and perfect capsules can have a false border along the midline due to subgroup shenanigans
circle_part->set_size(dim, dim);
circle_part->set_padding(4);