diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 09:43:05 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | 826ec1fac3c012e71ab34207328faaac5b5827b7 (patch) | |
| tree | e0e6b1f5a38c963875aa91c5817c27245a291faa /docs/render-pipeline.md | |
| parent | 7f8b9d2e8666c2e2104abcd462d79cf6f949c718 (diff) | |
| download | pardes-826ec1fac3c012e71ab34207328faaac5b5827b7.tar.gz pardes-826ec1fac3c012e71ab34207328faaac5b5827b7.zip | |
Shader files compile again on save; an attached GUI runs the session's post 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.
Diffstat (limited to 'docs/render-pipeline.md')
| -rw-r--r-- | docs/render-pipeline.md | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/docs/render-pipeline.md b/docs/render-pipeline.md index b8f735d9..88309d4a 100644 --- a/docs/render-pipeline.md +++ b/docs/render-pipeline.md @@ -501,8 +501,15 @@ Mirror ghostty 1.3.2 (`zig-pkg/ghostty-*/src/renderer/shadertoy.zig`, file, not `<stdin>`. Level A redraws once a refresh of the window's display. A failed compile keeps the file's last good pipeline and says glslc's first line as a message; glslc missing is said once, and only files stay off (the bundled passes are compiled with the - build, through the same prefix). No file watching: `Shader <path>` twice - (out, then in) compiles it again. + build, through the same prefix). The files' directories are watched + (file_watch shader slots): a change there has each file read and hashed, + and one whose bytes moved compiles again; the same bytes (good or bad) + compile nothing and say nothing twice. The process that holds the core + compiles (shader_build.zig): a local GUI, or a detached session, which + sends its attached GUIs the chain with each file's SPIR-V (wire `post`, + on attach and on every change), so an attached GUI runs the same passes, + levels and ShaderAnimation as a local one and still reads no disk and runs + no program. - **Animation mode**: `ShaderAnimation off|on|always` (ghostty's `custom-shader-animation`): off = redraw only when content changes; on = continuous while the window is focused; always = continuous. Continuous means |
