GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git
carves: the focus glint uses the plate's monotonic roll profile
A carve wall's slope is a bell — rising then falling across the band —
so its tilt crossed the glint angle twice and the focus ring drew two
concentric lines. With roll_slope the ring is exactly a plate
silhouette's glint: one line, same position and width.
Co-Authored-By: Claude Fable 5 <[email protected]>
src/vk/shader2d.wgsl | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/vk/shader2d.wgsl b/src/vk/shader2d.wgsl
index 261f170..2aa5a5d 100644
--- a/src/vk/shader2d.wgsl
+++ b/src/vk/shader2d.wgsl
@@ -648,7 +648,12 @@ fn plate_shade(frag: vec2f, vcol: vec4f) -> vec4f {
// as the line, not a lit step. Plates leave w at 0.
let tw = rrect_clip.p_spec_tint.w;
if (tw > 0.0) {
- v = roll_spec_wrap(sv) * strength * att;
+ // The PLATE's monotonic roll profile, not the carve wall's: a wall's
+ // slope is a bell (rises then falls), so its tilt crosses the glint
+ // angle twice and drew two concentric lines. With roll_slope the ring
+ // is exactly a plate silhouette's glint — one line, same position.
+ let fr = clamp(1.0 - u, 0.0, 1.0);
+ v = roll_spec_wrap(fgd * roll_slope(fr)) * strength * att;
}
if (v >= 0.0) {
// Highlight: the white screen mixes toward the tint color, slightly