Skip to content

A screensaver for Windows that can run Shadertoy shaders locally with little to no modification.

License

Notifications You must be signed in to change notification settings

AnalogFeelings/Shadersave

Repository files navigation

🌈 Shadersave

GitHub issues GitHub pull requests GitHub GitHub commit activity (branch) GitHub Repo stars Mastodon Follow

Shadersave is a Windows screensaver that can run Shadertoy shaders locally under OpenGL 4.3 core.

Warning

This is still under development and does not have most features implemented.

🗺️ Roadmap

  • Add image loading support.
  • Refactor to use standard C++ naming.
  • Move buffers to an array.
  • Rewrite renderer entirely.
  • Get buffers and channels working.
  • Rewrite shadertoy loader.
  • Implement remaining global variables.
  • Get basic conversion code working.
  • Get OpenGL renderer working.
  • Clean up the code.
  • Add support for loading from files instead of resources.
  • Add config dialogue using Win32.
  • Come up with something to get full 144Hz displaying.

⚠️ Limitations

  • Audio and VR shaders will not be supported.
  • Mouse and/or keyboard input wont be supported for obvious reasons.
  • Non-image and non-buffer channel inputs won't be supported.
  • Cubemap shaders will not be supported.

🛠️ Building

To build this, you will need the following:

  • Visual Studio 2022.
  • The Desktop development with C++ workload.
  • The Windows SDK.

You must also place GLEW under the "libs" folder.

🪲 Debugging

Debugging screensavers is kind of a hassle, but it can be done.

  1. Open a Win32 window, for example Control Panel.
  2. Grab its window handle with Spy++ or some other software.
  3. Convert the handle from hexadecimal to decimal.
  4. Go into Shadersave -> Properties -> Debugging.
  5. On Command Arguments, write /p (window handle) and hit Apply.
  6. You can now debug the screensaver as long as you don't close the window you opened.

Tip

Renderdoc can be used this way as well, if you want to debug the graphics side.

To debug the configuration dialog, do the following:

  1. Do steps 1 to 4 from above.
  2. On Command Arguments, write /c:(window handle) and hit Apply.
  3. You can now debug the config dialog.

📷 Screenshots

pow(The Shining, 2.0) by dean_the_coder
shining

Barber by okro
barber

Cook-Torrance by xbe
torrance

Splitting DNA by BigWIngs
dna