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

commit23393cd3c26f3de13d58d04c7878b395e5293e53
parent6e80c9ba24
authorLucas Galante <[email protected]>
date2026-08-26 15:54
plates: the tinted roll is a wash, not a painted frame

Full-strength mixing at the silhouette read as a thick glowing border;
the accent now caps at 0.35 of the mix, so the focused plate's rolled
edge keeps its material and light/shade profile with a clear hue cast on
all four sides. The specular glint keeps its own tint term on top,
matching the pre-change look where it lands.

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

 src/vk/shader2d.wgsl | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/vk/shader2d.wgsl b/src/vk/shader2d.wgsl
index 0a66d23..8a3907a 100644
--- a/src/vk/shader2d.wgsl
+++ b/src/vk/shader2d.wgsl
@@ -514,13 +514,15 @@ fn plate_shade(frag: vec2f, vcol: vec4f) -> vec4f {
         let shade = 1.0 + (diff / flat_shade - 1.0 + extra) * strength;
         let spec = roll_spec(sv);
         // p_spec_tint.w = 1 marks an accent-tinted plate (the focused-pane
-        // treatment): the ENTIRE rolled edge takes the accent color — the
+        // treatment): the ENTIRE rolled edge takes a WASH of the accent — the
         // roll's material mixes toward the tint across its coverage (f = 1 at
-        // the silhouette, 0 on the face) with the light/shade profile intact —
-        // instead of only the specular glint. Neutral plates (w = 0) shade
-        // exactly as before.
+        // the silhouette, 0 on the face), capped well below full so the edge
+        // reads as the plate's roll with a hue cast, not a painted border
+        // (full-strength was tried and read as a thick glowing frame). The
+        // specular glint keeps its own tint term on top, as before. Neutral
+        // plates (w = 0) shade exactly as before.
         let tw = rrect_clip.p_spec_tint.w;
-        let rgb = mix(base.rgb, rrect_clip.p_spec_tint.rgb, tw * f);
+        let rgb = mix(base.rgb, rrect_clip.p_spec_tint.rgb, tw * f * 0.35);
         return vec4f(rgb * shade + rrect_clip.p_spec_tint.rgb * (spec * strength), abs(base.a) * aa);
     }