mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-29 02:03:35 +00:00
765c20235e
This change uses `include_wgsl!(…)` in usages where an `include_str!("….wgsl")` was used to construct a `ShaderModuleDescriptor`'s `source, but the `label` was set to `None`. This should (1) showcase a nice idiomatic convenience we offer in our examples better, (2) make code more concise, and (3) get some automatically generated labels in diagnostics where it seems it won't hurt. |
||
---|---|---|
.. | ||
mod.rs | ||
README.md | ||
shader.wgsl |
render_to_texture
Similar to hello-triangle but instead of rendering to a window or canvas, renders to a texture that is then output as an image like the storage-texture example.
If all goes well, the end result should look familiarly like hello-triangle with its red triangle on a green background.
To Run
cargo run --bin wgpu-examples render_to_texture