Skip to content

Commit faafed4

Browse files
committed
Update README.md
1 parent 839eb35 commit faafed4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ First, add `bevy-rust-gpu` to your `Cargo.toml`:
4040
bevy-rust-gpu = { git = "https://github.com/Bevy-Rust-GPU/bevy-rust-gpu", tag = "v0.3.0" }
4141
```
4242

43+
4344
Next, implement a `Material` type to describe your material's bind group layout and pipeline specialization:
4445

4546
```rust
@@ -57,6 +58,7 @@ struct MyRustGpuMaterial {
5758
impl Material for MyRustGpuMaterial {}
5859
```
5960

61+
6062
Then, implement `RustGpuMaterial` for your `Material` type.
6163

6264
```rust
@@ -86,6 +88,7 @@ impl RustGpuMaterial for MyRustGpuMaterial {
8688

8789
(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.)
8890

91+
8992
Next, add `RustGpuPlugin` to your bevy app to configure the backend.
9093

9194
```rust
@@ -94,6 +97,7 @@ Next, add `RustGpuPlugin` to your bevy app to configure the backend.
9497
app.add_plugins(DefaultPlugins);
9598
```
9699

100+
97101
For each `RustGpuMaterial` implementor, add a `RustGpuMaterialPlugin::<M>` to your app to setup backend rendering machinery.
98102
This will also configure hot-reloading and hot-rebuilding if the corresponding features are enabled.
99103

@@ -102,11 +106,13 @@ This will also configure hot-reloading and hot-rebuilding if the corresponding f
102106

103107
```
104108

109+
105110
If using hot-rebuilding, tell the material where to export its entry points:
106111
```rust
107112
RustGpu::<ExampleMaterial>::export_to(ENTRY_POINTS_PATH);
108113
```
109114

115+
110116
Finally, load your shader, and add it to a material:
111117

112118
```rust

0 commit comments

Comments
 (0)