Turn a Shadertoy-style fragment shader into a Windows screensaver (.scr).
You can download the current nightly build from GitHub Releases, or build it yourself from source.
All release archives include a GitHub artifact attestation. To verify a downloaded archive:
gh attestation verify .\shadertoy-to-scr-nightly.zip --repo Z1xus/shadertoy-to-scrRequirements:
- Windows
- CMake 3.24+
- C++20 compiler
- OpenGL-capable graphics driver
cmake -S . -B build
cmake --build build
ctest --test-dir build --output-on-failureThe Windows build creates:
stscr_packager.exestscr_runtime.exestscr_runtime.scr
Shaders need the usual Shadertoy entry point:
void mainImage(out vec4 fragColor, in vec2 fragCoord)Build a .scr:
.\build\stscr_packager.exe .\examples\minimal.fragBy default, the packager looks for stscr_runtime.exe next to stscr_packager.exe and writes output next to the shader with a .scr extension. You can still override either path:
.\build\stscr_packager.exe `
--shader .\examples\minimal.frag `
--runtime .\build\stscr_runtime.exe `
--output .\build\minimal.scrFrame rate syncs to the display by default. Package a fixed cap or unlock rendering with:
.\build\stscr_packager.exe .\examples\minimal.frag --fps 30
.\build\stscr_packager.exe .\examples\minimal.frag --unlock-fpsThe generated screensaver exits on keyboard input, mouse button input, mouse wheel input, or real mouse movement.
Run it:
.\examples\minimal.scr /sTo install it, copy the generated .scr somewhere Windows can load screensavers from, then select it in Windows screensaver settings.
mainImage(out vec4 fragColor, in vec2 fragCoord)iResolutioniTimeiTimeDeltaiFrameiMouseiDateiSampleRateiChannelTime[4]iChannelResolution[4]iChannel0throughiChannel3
The channel samplers are currently bound to neutral 1x1 fallback textures. That means shaders that reference channels can compile, but real Shadertoy texture/video/cubemap inputs still need package metadata and loader support.
Buffers, audio shaders, keyboard input, real cubemap assets, real channel assets, and multipass rendering are not implemented yet.