summaryrefslogtreecommitdiff
path: root/shaders/ui.vert.glsl
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 06:04:28 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commit09ec515c5e94de741104038cd61f18b2b997e78c (patch)
tree4a7910c76c650df1695c4e3327538bfd8f68f493 /shaders/ui.vert.glsl
parent4452a8f467765cbfa0dd0444a9bf416ac8bd0bf5 (diff)
downloadpardes-09ec515c5e94de741104038cd61f18b2b997e78c.tar.gz
pardes-09ec515c5e94de741104038cd61f18b2b997e78c.zip
G5: lapis, 0x4200.cafe's manuscript, as a theme with its ornament
A native theme `lapis` (src/themes/lapis.zig) from web/theme/lapis.css: a lapis-deep page, lapis tags with gold names, vellum text, vermilion rubrics, gold rules and a vermilion tag rule, gold selection in lapis ink. Its ornament is the theme's new `decor` (colors.Decor), drawn by a pixel shell inside the chrome it already has (decision 1), all of it off every focus indicator: - page_dots: the site's gold dot grid (#e8c46a22, 22 px), drawn by the cell shader on page-coloured cells alone (flag 0x10000000), so it lies under the text and never under a selection, a tag or the cursor; fixed to the window, a page the panes lie on. - rail_checker: the dither frame's gold and lapis checker in the scroll track (a decor kind, flag 0x08000000), anchored to its rail; the thumb stays solid gold. - tag plaques (tag_border, tag_shadow, tag_stripe): every tag a raised plaque inside its own band, the site's trail: a 2px gold frame and a hard 5px vermilion shadow down and right, both within the band's rows and columns (down, what the slack under the text leaves), so no shadow reaches a body, a grip or the next pane. The focused pane's plaque is the code window's title bar, gold and lapis stripes of 2px, its words on plates of the focused ground; unfocused ones are plain; column and workspace tags take the object-label language (1px frame, 2px shadow toward the page). Drawn as decor under the cells (a group's under range), with blank tag cells see-through and the cells blended premultiplied (pipeline_over) on such frames; opaque windows only. - title_shadow: the titles' vermilion offset shadow under a file name's letters, sampled in the cell shader inside the letters' own cells (flag 0x08000000), none on a cursor. Chrome carries the decor (decor_*, name_ink, active_name_ink); a theme file folds a nested decor literal field by field. Left out, with why, in docs/effects.md: the fonts, the ornaments, a decor crossfade, and in the tty anything but the colours (a tag row has no spare cell for a shadow). An empty column is the page. The effect id is masked to 27 bits (ui.vert/ui.frag) for the fifth flag. Tests: the cell flags land only on page ground and file-name cells, never a cursor, nothing without decor; lapis's plaques stay inside their tag's band, clear of every grip, only the focused one striped; its checker is in the track; no other theme draws any; the separator and focus tests cover lapis. Goldens: theme and themesel (the ring gains lapis after acme). Gates as G4. Feel review: .scratch/render/lapis/ (lapis.png, lapis-2x.png, tags-focused-vs-unfocused-2x.png, a PanelSlide at 60 fps and a quarter).
Diffstat (limited to 'shaders/ui.vert.glsl')
-rw-r--r--shaders/ui.vert.glsl10
1 files changed, 6 insertions, 4 deletions
diff --git a/shaders/ui.vert.glsl b/shaders/ui.vert.glsl
index 5551f3f1..de22adee 100644
--- a/shaders/ui.vert.glsl
+++ b/shaders/ui.vert.glsl
@@ -14,9 +14,11 @@ layout(location = 3) in vec3 a_bg;
layout(location = 4) in vec4 a_panel_rect;
layout(location = 5) in vec4 a_present_rect;
// effect id, eased-progress float bits, pane serial, local row/column packed
-// into one uint. The FOUR high effect bits are flags — the frozen-old cell
-// layer, a see-through cell background, an opaque block-cursor fill and a
-// soft shadow (decor.frag.glsl) — so the id is what is left below them; integer transport preserves the exact
+// into one uint. The FIVE high effect bits are flags — the frozen-old cell
+// layer, a see-through cell background, an opaque block-cursor fill, a soft
+// shadow (decor.frag.glsl) or dotted page ground (ui.frag.glsl), and a
+// checker (decor) or a file name's shadow (ui) — so the id is what is left
+// below them; integer transport preserves the exact
// cross-backend hash.
layout(location = 6) in uvec4 a_effect;
// A clip rectangle in target pixels (x0, y0, x1, y1): the fragment shader
@@ -61,7 +63,7 @@ void main() {
v_cell_uv = vec2(0.0, 1.0);
}
- uint effect = a_effect.x & 0x0fffffffu;
+ uint effect = a_effect.x & 0x07ffffffu;
if (effect == 1u || effect == 2u || effect == 5u) {
// NDC y points up, so a top-left/bottom-right box has a NEGATIVE y
// delta. Preserve that sign or every local y is mirrored/outside.