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
A set of bevy plugins supporting the use of `rust-gpu` crates.
7
+
A set of bevy plugins supporting the use of [`rust-gpu`](https://github.com/EmbarkStudios/rust-gpu) shader crates.
8
8
9
9
Feature includes hot-reloading with metadata-based entrypoint validation, and hot-recompiling via runtime export of active entrypoints.
10
10
</div>
@@ -18,7 +18,7 @@ so can be left to the default `Material` implementation if desired.
18
18
Then, implement `RustGpuMaterial` for your `Material` type.
19
19
This will require creating marker structs to represent its vertex and fragment shaders,
20
20
and implementing the `EntryPoint` trait on them to describe entry point names and compile-time parameters.
21
-
(See `src/bevy_pbr_rust.rs` for the `bevy-pbr-rust`-backed `StandardMaterial` reference implementation.)
21
+
(See [`bevy_pbr_rust.rs`](https://github.com/Bevy-Rust-GPU/bevy-rust-gpu/blob/master/src/bevy_pbr_rust.rs) for the [`bevy-pbr-rust`](https://github.com/Bevy-Rust-GPU/bevy-pbr-rust)-backed `StandardMaterial` reference implementation.)
22
22
23
23
Next, add `RustGpuPlugin` to your bevy app to configure the backend.
24
24
Currently this must occur before `RenderPlugin` is added (most often via `DefaultPlugins`), as it requires early access to `WgpuSettings` to disable storage buffer support.
@@ -46,16 +46,17 @@ and re-specializes the material if it becomes available after a reload.
46
46
Adds the `EntryPointExport` resource, which can be used to retrieve an `ExportHandle` corresponding to a JSON output file.
47
47
When passed to a `RustGpu` material, active entrypoints to be aggregated and exported to the corresponding file on change.
48
48
49
-
This can be used in concert with the `hot-reload` feature, `rust-gpu-builder`'s file watching functionality,
50
-
and `permutate-macro`'s static permutation generation to drive a hot-rebuild workflow:
49
+
This can be used in concert with the `hot-reload` feature, [`rust-gpu-builder`](https://github.com/Bevy-Rust-GPU/rust-gpu-builder)'s file watching functionality,
50
+
and [`permutate-macro`](https://github.com/Bevy-Rust-GPU/permutate-macro)'s static permutation generation to drive a hot-rebuild workflow:
51
51
52
52
* The bevy app loads a `RustGpu` material, tries to specialize it, and exports the set of required entry points to `entry_points.json`
53
-
*`rust-gpu-builder` picks up the change to `entry_points.json` and triggers a recompile
54
-
*`permutate-macro` attributes in the target shader crates read `entry_points.json`, and conditionally generate the required entry points
53
+
*[`rust-gpu-builder`](https://github.com/Bevy-Rust-GPU/rust-gpu-builder) picks up the change to `entry_points.json` and triggers a recompile
54
+
*[`permutate-macro`](https://github.com/Bevy-Rust-GPU/permutate-macro) attributes in the target shader crates read `entry_points.json`, and conditionally generate the required entry points
55
55
*`rust-gpu` compiles the generated code, outputting `shader.spv` and `shader.spv.json`
56
56
* The bevy app picks up the changes to `shader.spv` and `shader.spv.json`, hot-reloads them, and respecializes the material with the now-available entry points
57
57
* Repeat as new `RustGpu` materials are loaded by the bevy app
58
58
59
59
### `bevy-pbr-rust`
60
60
61
-
Implements `RustGpu` for `StandardMaterial` via the `MeshVertex` and `PbrFragment` entry point markers.
61
+
Implements `RustGpu` for `StandardMaterial` via the `MeshVertex` and `PbrFragment` markers,
62
+
which corresponding to entry points defined in [`bevy-pbr-rust`](https://github.com/Bevy-Rust-GPU/bevy-pbr-rust).
0 commit comments