git.lucas.co / cce-ui
GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git

commit80d50de46d101f8089d002a6b332bc8903b49067
parent28e12b052f
authorLucas Galante <[email protected]>
date2026-07-22 12:39
fix: edge-suppressed carves never group into a plate's CSG features

A suppressed wall extends its carve rect past the boundary, relying on
the overlay cover quad to keep that shading out of the drawn pixels —
a clip the grouped path's whole-plate draw does not have, so grouped
union pieces (section wells, rocker halves) smeared their extended
walls across the plate. This was latent: any ordinary prim between a
plate and its carves closes the grouping window, and the params panes
always had one (most recently the rockers' tinted faces) until the
flat-rocker change removed the last of them, letting ~70 pane carves
group for the first time — over the 64-feature budget and full of
suppressed walls. Full-ring carves (button grooves, slider wells)
still group as designed.

Co-Authored-By: Claude Fable 5 <[email protected]>

 src/backend/window_runner.rs | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/backend/window_runner.rs b/src/backend/window_runner.rs
index caf3580..6021244 100644
--- a/src/backend/window_runner.rs
+++ b/src/backend/window_runner.rs
@@ -1552,7 +1552,15 @@ pub fn tessellate_display_list(
                 // carve becomes a CSG feature of that plate's single draw —
                 // exact composite shading, real junctions at the plate's rolled
                 // perimeter — instead of a shading overlay (the fallback below).
-                if let Some((bi, prect)) = last_plate.filter(|_| mode < 3.5) {
+                //
+                // Edge-suppressed carves NEVER group: a suppressed wall's rect
+                // extends past the carve (below), relying on the overlay cover
+                // quad to keep that shading out of the drawn pixels — a clip
+                // the plate's whole-surface draw does not have, so grouped it
+                // smears the extended walls across the plate. Union pieces
+                // (section wells, rocker halves) are exactly these.
+                let full_ring = *edges == (true, true, true, true);
+                if let Some((bi, prect)) = last_plate.filter(|_| mode < 3.5 && full_ring) {
                     let inside = rect.x >= prect.x - 0.5
                         && rect.y >= prect.y - 0.5
                         && rect.x + rect.width <= prect.x + prect.width + 0.5