Add multiple render targets example (v2)
Connections This PR depends on https://github.com/gfx-rs/wgpu/pull/5312
This is a new version of https://github.com/gfx-rs/wgpu/pull/5297 which had some issues.
Description This PR adds a new example that demonstrates how to use multiple render targets when you want to render to two or more targets from the fragment shader.
As far as I know, none of the existing examples demonstrate this, and furthermore, finding information about how to do this with wgpu seems to be way too challenging, or at least it was for me. I had to ask help from multiple people who knew how to do this, and before that I was not even sure if this was possible at all.
Testing I am not sure if this should or can be tested, or if the core feature has already been tested. Suggestions or instructions are welcome on how to implement the required tests.
Checklist
- [x] Run
cargo fmt. - [x] Run
cargo clippy. If applicable, add:- [ ]
--target wasm32-unknown-unknown - [ ]
--target wasm32-unknown-emscripten
- [ ]
- [x] Run
cargo xtask testto run tests. - [x] Add change to
CHANGELOG.md. See simple instructions inside file.
@cwfitzgerald Your requested changes are now implemented. Let me know if there is anything else.
I added another commit to make all the imports direct as I realized that is probably what you meant and not just the wgpu imports.