mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-23 07:51:08 +01:00
* Make the color attachments `Option`-al in render pipelines, render passes, and render bundles * vk: `Option`-al color attachments support * dx12: sparse color_attachments support * Only non-hole attachments is supported on wasm target and gl backend * deno_webgpu: `Option`-al color attachments support * Follow all suggestions
capture
This example shows how to capture an image by rendering it to a texture, copying the texture to a buffer, and retrieving it from the buffer.
This could be used for "taking a screenshot," with the added benefit that this method doesn't require a window to be created.
To Run
cargo run --example capture
open examples/capture/red.png
