You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shadplay is an app designed to help you learn `wgsl` with minimal friction, specifically for those wanting to learn `wgsl` to write shaders for bevy.
21
-
The idea is to give one the minimal amount of bevy boilerplate etc., possible to get started writing \`wgsl\` ASAP, and provide a library of examples showing how some things are done, can be done etc.
20
+
Shadplay is an app designed to help you learn `wgsl` with minimal friction, specifically for those wanting to learn `wgsl` to write shaders for [Bevy](https://bevyengine.org/).
22
21
23
22
A secondary goal is to flesh out a relatively comprehensive 'port' of existing cool shader work from places like shadertoy etc -- because there's a few 'gotchas' around the differences in `glsl` and `wgsl` syntax, their respective builtins.
24
23
25
24
A tertiary goal is to surface the builtins/existing library code that bevy's codebase provides.
26
25
26
+
You will notice a large swath of the `wgsl` code from the Bevy codebase here, _we_ want it to be available to you and searchable (within your IDE) as, the `lsp` story for `wgsl` is not a great one... _yet_!.
- A large collection of example shaders illustrating creative and educational uses. `assets/shaders/yourshadergoeshere.wgsl` specifically focusing on `wgsl`.
38
+
- A large collection of example shaders illustrating creative and educational uses. `assets/shaders/yourshadergoeshere.wgsl`.
38
39
- Live preview of shader code on bevy mesh geometry.
39
40
- Textures, see `assets/shaders/howto-texture.wgsl`.
40
41
- Drag and drop `.png` or `.jpg` files onto the window to use as said textures.
41
42
- Mouse coords over a `uniform`, see `assets/shaders/howto-mouse.wgsl`.
42
43
- Colour picker with system copy so that you get an immediate `vecf3(r, g, b)` immediately available for quick pasta action.
43
-
- Drag and drop (valid `wgsl`) shaders onto the app.
44
-
-Scripts to format your `wgsl` work, so it looks more rusty.
45
-
- Scripts to pull _all_ the functions from the bevy codebase's shader code so you can easily lookup what's available for import.
46
-
- Scripts to search the bevy source code (opening your browser) for specific keywords.
44
+
- Drag and drop (valid `wgsl`) shaders onto the app window to see them working.
45
+
-Tips and Tools to format your `wgsl` work, so it looks more rusty (which will help you quickly get up to speed with the existing `wgsl` in the Bevy codebase).
46
+
- Scripts to pull _all_ the functions from the Bevy codebase's shader code so you can easily lookup what's available for import. (See `scripts/README.md`)
47
+
- Scripts to search the Bevy source code (opening your browser) for specific keywords. (See `scripts/README.md`)
47
48
- Continious image capture to create .gifs! (Currently only supporting a maximum framerate of 20FPS for capture.)
48
49
- Automatic recompilation and update of shaders upon saving changes in your editor.
49
50
- Quick iteration and experimentation with `wgsl` shader code.
eprintln!("Failed to clone Bevy repository.\nShadplay makes a copy of the bevy codebase here to help generate documentation for you, if you don't want that modify _this_ file `./shadplay/build.rs`");
| file_and_func.py | This is a script that pulls the filenames/function pairings from the bevy sourcecode.
20
+
| `file_and_func.py` | This is a script that pulls the filenames/function pairings from the bevy sourcecode.
21
+
|
22
+
|`make-gif-example.sh`| Shows how one _may_ make a `.gif` from the output of gif-capture-mode, see main `../README.md`|
23
+
|`make_bevy_shaderdoc.py`| creates a single markdown document with _**all**_ the Bevy codebase's `wgsl`|
24
+
|`reset-2d.py`| Resets the 2d shader (useful if you want to try again from the default). |
25
+
|`reset-3d.py`| Resets the 3d shader (useful if you want to try again from the default). |
26
+
|`screenshots-to-gallery.py`| Moves shader screenshots you've created into markdown documents that pairs the code that generated them and said screenshot. |
27
+
|`search-bevy-codebase-for.sh`| An example of something that may help you search the bevy codebase faster (if the shader doc generated by `make_bevy_shaderdoc.py` isn't helpful) |
28
+
|`update-gallery.py`| updates the gallery's `README.md`|
29
+
| `wgsl-case-changer.py` | go between `snake_case` and `CamelCase`, rusty
0 commit comments