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

commitb97ac1f2595705be882197a9482eda30157b936a
parent7c511e727e
authorLucas Galante <[email protected]>
date2026-08-27 12:30
plates: a fill-less tinted plate is a pure focus ring

A transparent-fill Bevel with an accent tint renders the wrapped glint
alone — on the plate roll itself, so the line traces the exact
superellipse silhouette, radius family, and inset of every node and
pane. The carve-band ring could not: its band straddles the boundary,
and outward offsets of an Lp corner round off, so the glint drifted off
the DE corner shape (with pinches where the band outgrew small radii).

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

 src/vk/shader2d.wgsl | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/vk/shader2d.wgsl b/src/vk/shader2d.wgsl
index 2aa5a5d..92efaf0 100644
--- a/src/vk/shader2d.wgsl
+++ b/src/vk/shader2d.wgsl
@@ -542,6 +542,15 @@ fn plate_shade(frag: vec2f, vcol: vec4f) -> vec4f {
         var spec = roll_spec(sv);
         if (tw > 0.0) {
             spec = roll_spec_wrap(sv);
+            // A FILL-LESS tinted plate is a pure focus ring (the network
+            // cursor): the wrapped glint alone, on the plate's own roll — so
+            // the line traces the same superellipse silhouette, radius
+            // family, and inset as every node and pane, which a
+            // boundary-straddling carve band cannot (outward offsets of an
+            // Lp corner round off).
+            if (abs(base.a) < 0.004) {
+                return vec4f(rrect_clip.p_spec_tint.rgb, spec * strength * aa);
+            }
         }
         return vec4f(base.rgb * shade + rrect_clip.p_spec_tint.rgb * (spec * strength), abs(base.a) * aa);
     }