Merge pull request #298 from yutannihilation/doc/include_wgsl

Mention include_wgsl!
pull/303/head
sotrh 2 years ago committed by GitHub
commit d5074ecb79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -146,6 +146,17 @@ let shader = device.create_shader_module(&wgpu::ShaderModuleDescriptor {
});
```
<div class="note">
You can also use `include_wgsl!` macro as a small shortcut to create the `ShaderModuleDescriptor`.
```rust
let shader = device.create_shader_module(&include_wgsl!("shader.wgsl"));
```
</div>
One more thing, we need to create a `PipelineLayout`. We'll get more into this after we cover `Buffer`s.
```rust

Loading…
Cancel
Save