Files
wgpu/examples/src/render_to_texture
Erich Gubler 765c20235e refactor: use include_wgsl!(…) more (#6326)
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.
2024-09-26 08:47:57 +02:00
..
2023-11-25 22:59:40 +00:00

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