Skip to content

Ghostty native shaders (Slice 3, stacked on #516) - #517

Draft
raiseCatError wants to merge 1 commit into
feature/kitty-native-shaders-20261028from
feature/ghostty-native-shaders-20261028
Draft

raiseCatError wants to merge 1 commit into
feature/kitty-native-shaders-20261028from
feature/ghostty-native-shaders-20261028

Conversation

@raiseCatError

Copy link
Copy Markdown
Owner

Stacked on #516 (Kitty native shaders), so this diff is Slice 3 only. Retarget after #516 lands, and only after review.

What

/appearance › Ghostty shaders: NMSh-original GLSL passes for Ghostty, composed after the person's own shaders.

  • Version gates verified against Ghostty's shader prefixes for 1.2.0, 1.3.0, 1.3.1 and 1.4.0. The 1.3.x and 1.4.0 prefixes are identical. Each preset needs only the uniforms it reads.
    • Fail closed (nothing offered): no reported version (tmux, ssh), anything older than 1.2, or anything newer than 1.4.x.
  • Presets (one trail at a time): Smear, Comet, Aurora, Dim when unfocused, Vignette, Scanlines, Text glow.
    • Every parameter is compiled in, and a test proves it changes the source.
    • Values are validated, never clamped.
  • Composition: one optional config-file = ?… include at the end of the effective root config.
    • A simulation of Ghostty's config graph must show the person's passes unchanged and in order, or the plan is refused.
    • It models: roots, the include queue, clears, ?, quotes, and relative paths.
    • NMSh never writes custom-shader = resets or custom-shader-animation.
  • Ownership: ledger plus the Slice 1 snapshot transaction.
    • Exact review before any write; re-planned at confirm.
    • Exact removal, including CRLF and no-final-newline files.
    • Edited or unowned files are preserved.
    • The launch command line is checked for config/shader overrides.
  • Never two trails:
    • Refuses a trail next to the person's cursor shader, or next to a shader it cannot read.
    • Pauses NMSh's older /cursor Ghostty shader inside the same transaction; removal resumes it the same way.
    • A reload-pending record keeps Portable from drawing over a trail Ghostty may still have loaded.
  • Gates: Reduced Motion, Effects Off, the Portable renderer and non-trail motion all remove NMSh passes on sync, including once at startup. Inside tmux, the version recorded at review is used.
  • Architecture: TerminalApp stays host-neutral, with all wiring in glslStudio.ts. Kitty and Ghostty share one ShaderStudioPanel.

Verification

  • Canonical npm run verify on frozen source: 4662 tests, 4648 pass, 0 fail, 13 skipped, 1 existing todo; exit 0.
  • Focused 132/132.
  • Live tests on installed Ghostty 1.3.1 and on a staged, signature-verified 1.4.0, both headless with a private HOME:
    • the uniform table matches each binary;
    • +validate-config accepts NMSh's composed config;
    • a slangc proxy compile accepts every preset.
  • An independent review (Codex, read-only) found no blocker. All 7 of its findings were fixed with regression tests.

Not verified: GPU rendering and physical Ghostty/Kitty/Zed QA were not run. The compile is a proxy: Ghostty's glslang → SPIRV-Cross → Metal path was not exercised.

#516's Mermaid CI failure (run 40656373289) is unrelated and is not touched here. It was not rerun. Local runs pass 3/3; see the diagnosis in the docs.

… person's passes

Adds /appearance › Ghostty shaders. NMSh generates its own GLSL passes, verified
against the Ghostty 1.2-1.4 shader interfaces, and composes them after the
person's custom-shader list through one optional include, with an exact
simulation, ownership ledger, reviewed atomic writes and exact removal.
Reduced Motion, Effects Off and the /cursor renderer gate the passes, and a
reload-pending state keeps Portable from drawing a second trail.

The Kitty and Ghostty studios now share one panel.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant