Skip to content

New shadertoys features #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

raldone01
Copy link

@raldone01 raldone01 commented May 17, 2025

This is a rework of the shadertoys demo with new features.

TODO/Wishlist:

  • Shader Interaction
    • Add target_framerate constant. Use it in all shaders instead of 60 if possible.
    • Add support for persistent buffers and data.
    • Ui tweakable variables.
    • Press r to reset shader data.
    • Use left/right arrows for time jumping.
    • Add audio support. Use up/down arrows for volume.
    • Pause with space.
    • Hot reloading of shaders by compiling just the one shader for more speed and removing the need to close the program.
  • UI Changes
    • Add a screenshot button
    • Add fun transitions when switching between shaders.
    • Toggle fullscreen with f11.
    • Remember window position. Not possible on wayland but could remember windows size at least.
  • HUD
    • Toggle HUD with h.
    • Cycle target_framerate with f [30, 60, 144, uncapped].
    • Add fps counter toggle with c. Maybe even a fancy chart such as mangohud has.
    • Show shader information (Name, Author, Link to original, description).
    • Show current frame count.
    • Show window resolution
  • Interaction
    • Support keyboard
    • Support Mic
    • Support cam
    • Support extended mouse functions: clicking, dragging, scrolling, tracking, primary, secondary, etc.
  • Fix clippy lints
  • Add loop optin? with save to gif?

Done

  • Shader Interaction
    • Grid mode can be toggled with g
    • Shaders can be switched with q and e
    • Make shader registration more modular.
    • Expose shader information to the main cpu program.

The indentation can be reversed easily. I just don't like working with 4 spaces.

@LegNeato
Copy link
Contributor

Thank you! It's hard for me to take a look and give feedback with the spacing changes, as it is hard to pick out real changes. Totally understand you want to iterate with two spaces, but when you're ready for me to look at it please revert back to the stock spacing and run rustfmt! 🍻

raldone01 added 2 commits June 7, 2025 14:15
* Add lint rules.
* Add `rustfmt.toml` for predictable formatting.
* Update dependencies.
* Add a shader prelude.
@raldone01 raldone01 changed the title Make shader registration more modular. New shadertoys features Jun 7, 2025
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.

2 participants