Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tonarino/shadergarden
Create evolving artistic images with hot-code-reloaded Lisp and GLSL.
https://github.com/tonarino/shadergarden
glsl lisp reload shader
Last synced: 3 days ago
JSON representation
Create evolving artistic images with hot-code-reloaded Lisp and GLSL.
- Host: GitHub
- URL: https://github.com/tonarino/shadergarden
- Owner: tonarino
- License: mit
- Created: 2021-08-25T09:13:30.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T04:55:27.000Z (about 2 years ago)
- Last Synced: 2024-04-03T14:03:41.812Z (10 months ago)
- Topics: glsl, lisp, reload, shader
- Language: Rust
- Homepage: https://blog.tonari.no/shadergarden
- Size: 6.68 MB
- Stars: 106
- Watchers: 5
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `shadergarden`
Shadergarden is a tool for building hot-code-reloadable shader pipelines. For a tutorial for how to get started, consult the [introductory blog post](https://blog.tonari.no/shadergarden) or the [shadergarden lisp language documentation](./LISP.md).
## Usage
Once you've installed shadergarden via `cargo install shadergarden`, test to see that it is installed properly by running:```
shadergarden --help
```This should print out some usage information. To create a new project, run:
```
shadergarden new path/to/project
```This will create a new example project in the specified directory. To run a shadergarden, cd into the directory of a project and run:
```
shadergarden run
```This should open a new window and start running your graph. Don't close the window if you want to make changes; instead, open the project in an editor of your choice - the graph will update on save.
If a build error is encountered while reloading, `shadergarden` will log the error and continue executing the old graph.
### Fancier Usage
You can pass input images and videos to shadergarden using the `-i` flag. This flag takes a list of paths to photos/videos - you must pass the same number of input photos/videos as the number of `(input ...)`s specified in `shader.graph`.Once you've got a nice shadergarden, to render out a png sequence, use the `render` subcommand. This subcommand works exactly the same as `run`, but requires an output directory. To render the game of life demo out into a gif, run:
```
mkdir out
shadergarden render demos/life -o out -s 30 -e 430
ffmpeg -i "out/frame-%4d.png" -framerate 30 life.gif
```You should see something like this (it might be a *little* fancier):
Happy hacking!