Skip to content

Commit d653518

Browse files
committed
Update README.md
1 parent a816698 commit d653518

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ struct MyRustGpuMaterial {
5050
color: Vec4,
5151
}
5252

53-
// The vertex and fragment shaders specified here can be used as a fallback
54-
// when entrypoints are unavailable (see the documentation of bevy_rust_gpu::prelude::RustGpuSettings),
53+
// The vertex and fragment shaders specified here can be used
54+
// as a fallback when entrypoints are unavailable
55+
// (see the documentation of bevy_rust_gpu::prelude::RustGpuSettings),
5556
// but are otherwise deferred to ShaderRef::Default, so can be left unimplemented.
5657
impl Material for MyRustGpuMaterial {}
5758
```
@@ -93,13 +94,19 @@ Next, add `RustGpuPlugin` to your bevy app to configure the backend.
9394
app.add_plugins(DefaultPlugins);
9495
```
9596

96-
For each `RustGpuMaterial` implementor, add a `RustGpuMaterialPlugin::<M>` to your app to setup rendering machinery and hot-reload / hot-rebuild support if the respective features are enabled (see below.)
97+
For each `RustGpuMaterial` implementor, add a `RustGpuMaterialPlugin::<M>` to your app to setup backend rendering machinery.
98+
This will also configure hot-reloading and hot-rebuilding if the corresponding features are enabled.
9799

98100
```rust
99101
app.add_plugin(RustGpuMaterialPlugin::<MyRustGpuMaterial>::default());
100102

101103
```
102104

105+
If using hot-rebuilding, tell the material where to export its entry points:
106+
```rust
107+
RustGpu::<ExampleMaterial>::export_to(ENTRY_POINTS_PATH);
108+
```
109+
103110
Finally, load your shader, and add it to a material:
104111

105112
```rust

0 commit comments

Comments
 (0)