| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
let the GUI rest; a perf gate
somtrmsz's contrast floors made ChromeTheme.fromTheme run its focus-tint
and separator searches (pow calls each), and Output's RowDecoration.styleAt
called it for every grapheme of every highlighted row: the 50k-line file's
render went from 0.11 ms to 13 ms. Pardes.bodyChrome now keeps the theme's
chrome, worked out again only when the theme differs; recolorSyntax asks
for it once a decorated row, and a plain row (nearly every row of a file)
never asks. ReleaseFast, medium fixture, median us, before -> after (main):
render 13150 -> 76 (111), key-down 14658 -> 79 (110), wheel 13589 -> 76
(109), open 14891 -> 2095 (2055), edit-char 16703 -> 3006 (1251; the rest of
that gap is editing and tree-sitter, not this).
Post.animating asked for frames whenever the window had focus and any pass
was ready, so a still pass kept the GUI drawing at the display's rate
(Bloom: 49% of a core idle, in a hidden test window). A pass now says
whether it moves on its own: the CRT (its hum and dither) and a Shadertoy
file whose source reads iTime, iFrame or iDate (shader_build.readsTime; the
flag rides the wire's post message); Bloom, Vignette and Grain are still.
Bloom idle: 49% -> 1.2%, as with no pass.
zig build perf-gate: the 50k-line file's gestures, each's fastest sample
within 3x of the recorded baseline's (test/perf-baseline-<platform>-
<optimize>.json, recorded from this build), run with every unit-test. On
the regressed code it fails at 180x for render.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
chain
shader_build.zig takes the Shadertoy compile out of the GUI's Post: the
process that holds the core compiles each chain file behind the prefix on a
thread, watches its directory (file_watch's new shader slots), and on a
change reads and hashes each file, compiling only one whose bytes moved. A
failed compile keeps the last good SPIR-V and is said once; the same bytes
are never compiled or reported twice. A file is read with std, not fs.zig's
readFile, whose turn hand-off a worker thread does not hold.
A detached session compiles for its frontends and sends them the chain
(wire post: each pass's scene and level or the file's SPIR-V, and
ShaderAnimation) on attach and on every change, so an attached GUI runs the
same passes, levels and animation as a local one while still reading no disk
and running no program. The attached GUI describes its frames to the chain
from the session's chrome and redraws an animating chain on its own.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Three bundled Shadertoy passes beside Crt, each `Bloom|Vignette|Grain
0..3` (off by default, nothing drawn while off), in shaders/post/:
- Bloom: what is brighter than the page (a channel's linear peak over
0.75/0.7/0.6 and over the page's own + 0.15, so a light page does not
bloom) glows, 2/3.5/5% (§8.2's budget). The glow is a dual Kawase blur
in RGBA16F textures at half size and down, 3/4/5 steps by level
(shaders/bloom-down, bloom-up; Post.bloomChain), composited in linear
light and dithered.
- Vignette: round, from halfway to a corner, 10/18/28% at the far corners,
in linear light, dithered.
- Grain: a still, triangular-spread grain of 1.5/3/5 of 255 on
page-coloured pixels only, a logical pixel big; still, so it asks for no
frames.
Focus rule: the shell passes every bundled pass the rectangles of the tags
with their grips, the column and workspace tags, the notices and the
cursor (pardesSpare, at most 32, neighbours on one row merged), and a
bundled pass leaves them as they are; and a per-theme ceiling (pardesCap,
Post.capsOf) keeps the page's text and the selection's text at min(their
contrast, 4.5) under each pass at its strongest. User files get no
ceiling and no spared rectangles.
Fix found on the way: SDL GPU binds at most 4 KiB of a uniform block, so
every Shadertoy colour after iPalette (iBackgroundColor, iForegroundColor,
the cursor and selection colours, iPalette[>=4]) read zero. The prefix's
block is cut in three (Globals, Palette, Colors) with ghostty's names and
order, each pushed as a slice of the one struct; pardes's own block moves
to binding 3.
Tests: the caps hold over every native theme; each uniform slice fits
4 KiB; the prefix's members in ghostty's order across its blocks.
Gates: tty/gui unit-test and core-test pass; snap fails only
nested-optout; GUI goldens 01-08 byte-identical (09-18 wait on
wkzlsqvy, as in somtrmsz); web builds. Feel review material:
.scratch/render/{bloom,vignette,grain}/ (levels on forge, dusk, acme,
crops, a levels mp4).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
separators and focus tints
Density: dp() in gui.zig draws every size given in pixels in logical
pixels (SDL's window display scale, rounded, at least one), as acme scales
Border, ButtonBorder and Scrollgap: the rules (rule_px), the tag rule, the
grip's ring, its dirty gap and mode bars, the rail's gap to the text and
its minimum, the thumb's inset, the rim, a bar cursor's minimum width,
underline and strikethrough thickness (the atlas is dropped on a scale
change), the rule-grab margin, and the Crt's scanline and mask periods
(pardesScale in the post prefix). Cell- and tagline-measured sizes stay:
the rail's width, Lift's blur and offsets, every motion; iResolution,
fragCoord and iMouse stay in the display's pixels, as ghostty's.
PARDES_TEST_SCALE forces a density in a harness (a test window is 1x
otherwise, whatever display it lands on) and sizes the test font with it.
Colours: a separator that stands off its page by less than 1.5:1 is lifted
toward the text to 1.6:1 (helix, atelier, paper; a theme with no page,
dark, is judged against #121212), and empty_col follows it. forge's own
rule already stands at 3.83:1; what hid it was density: 2 device pixels
on a 3x screen, now 6 (dp). A focused tag's tint closer than 1.5:1 to the
plain tag on a dark page (1.25:1 on a light one) is pushed further the way
it leans, as far as its text keeps its own contrast or 4.5: forge
1.23 -> 1.51 (#2d3440 -> #374253), and likewise dusk, orchard, ink,
lagoon, clay, harvest, spectrum, solarium, forge_soft; daybreak, atelier,
paper to 1.25. dark and helix gain a tint of their own (dark: #484566
under #c8c8c8, 1.54:1; helix: ramp 237 under 250, 1.65:1).
Tag caret: past a full row's end, the G3 glide box sits on the tag's right
edge, where the layer's caret and the pixel shell's are.
Tests: every native theme's separator >= 1.5 and every dark one has a
tint >= 1.25 with readable text; forge keeps its own border; the tag caret
glide box at a full row; at 2x the spine, tag rule, ring, rail start and
gap, and bar cursor double. Legacy-ThemeFile test strips helix's new pair.
Goldens: snapshot goldens change in colour rows only, the tints (orchard
#283a2f -> #314738 at boot, forge, helix and dark in theme/themesel).
GUI goldens: the harness's single Del of the renamed wide pane is refused
since ysqnkyoy (a rename counted as unsaved; fixed on the 9P line in
wkzlsqvy), so scenes 09-17 were recorded with that pane open and the file
was stale since the merge (08 and 18 also moved with ykvnltvs's full-row
tag wrap). The goldens here were recorded with that pane closed (as
wkzlsqvy will close it); against the parent's binary under the same
conditions they differ only in the tints: 01-13 forge's (#2d3440 ->
#374253, and the glyph edges on it), 14 ink's; 15-18 are byte-identical.
Until wkzlsqvy is merged, a run here fails 09-17. Each commit reproduces its own
recorded goldens on this machine (checked at kvtmqkyn). A test window is
1x unless PARDES_TEST_SCALE says otherwise, whatever display it opens on.
Prebuilt shaders refreshed from their sources.
Captures: .scratch/render/dark-borders/{before,after,compare,scale2,scale3}.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The user tried them live and wants them removed entirely: the builtins,
their levels, config keys and leader paths (tR, tg), their slots in the
built-in chain, their shaders (source and prebuilt), EffectCode paths, and
on macOS their scene flags (pardes.h), the Metal kernel's coordinate warps
and the Swift pointer mapping that mirrored them. Docs say so (decision 8
in docs/render-pipeline.md); config.md documents Crt's levels, Shader and
ShaderAnimation instead.
Shared files touched: macos.zig (flags). Not touched: pardes.zig,
Messages.zig, mouse.zig, gui.zig, detached/*.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coordinator's request: `Crt 0..3` (likewise Ripple, Glitch), 0 off, `on`
the default level 2 (the polished rewrite), `off` and a bare word as
before. The level is one uniform (pardesLevel, beside pardesOpaque in the
prefix's own block); each pass picks its constants by it. Level 3 is at
least as strong as the old effects, measured as pixels changed by more
than 8 in a channel against a plain frame: Crt 18.3% (old 17.4%), Ripple
11.1% (9.5%), Glitch 9.3% a frame (8.1%); Glitch's level raises how often
it bursts as well as how hard. Config and ctl report `Crt 2` / `Crt off`.
Shared files touched: ninep/ctl.zig (the report line). Not touched:
pardes.zig, Messages.zig, mouse.zig, gui.zig, detached/*.
|
| |
|
|
|
|
|
|
|
|
|
| |
Stage 9 review: a user's Shadertoy file goes to glslc on its stdin, so no
source file is written anywhere (the old predictable name under
XDG_RUNTIME_DIR or /tmp was a symlink-clobber hazard). std's spawn does
all its allocation before fork and searches PATH on the stack after it,
said at the call. Level A redraws are paced by the display's refresh rate
(SDL_GetCurrentDisplayMode), not a fixed 16 ms.
Shared files touched: gui.zig.
|
|
|
rewritten as Shadertoy files
Stage 9 of docs/render-pipeline.md. src/gui/Post.zig runs the chain over
the finished frame: each pass reads the one before, ping-pong textures
between, the last writes the window; an empty chain is the direct path.
The prefix (shaders/post/prefix.glsl) is ghostty's uniform block, name
for name and offset for offset (tested against a copy of its Uniforms, the
selection colours by their GLSL names), at SDL GPU's bindings, y down.
A user's file (Shader <path>) is compiled by glslc with compileGlsl's own
flags on a thread of its own, taken in at the next loop step; errors name
the file's own lines; a failed compile keeps the last good pipeline;
glslc missing is said once. The bundled passes compile with the build,
through the same prefix.
Crt, Ripple and Glitch are Shadertoy files, rewritten: no barrel (input is
identity, tested), everything in linear light and dithered, keyed to iTime.
scene_effects, crt.zig and crt.frag.glsl are gone; the core keeps no clock
for the chain. ShaderAnimation off|on|always drives redraw level A: the
chain alone over the retained frame (34 us CPU a redraw, measured).
Shared files touched: pardes.zig (nextWake loses the scene line,
disableSceneEffects empties the chain, two tests), builtins.zig (one switch
arm), ninep/ctl.zig (two switch arms), macos.zig (flags from the chain),
gui.zig. Not touched: Messages.zig, mouse.zig, detached/*, host_io, tty.
|