read_texture
Inspect a live GPU texture or render target region without full capture, returning per-channel stats, hole coverage, and an ASCII luminance view. Resolves texture views automatically; use when a capture is armed.
Instructions
Read a region of a live GPU texture / render target (G-buffer attachment, depth, canvas) on a connected page, without taking a full capture. Copies the texture to a readback buffer, decodes per its format, and returns per-channel min/max/mean, the fraction of unrasterised 'hole' texels (RGB all ~0 = the clear value showing through), and a small ASCII luminance view of the spatial pattern — never raw pixels. Pass a Texture id OR a TextureView id (a render pass attachment is a TextureView — it is resolved to its source texture automatically, so no get_object round-trip is needed). The texture must have COPY_SRC, which the inspector adds to every texture while a capture is armed. Note: reading an engine's POOLED render target after the frame can be unreliable (the pool may have recycled it); to see the final image use screenshot_page instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Region origin x (default 0). | |
| y | No | Region origin y (default 0). | |
| layer | No | Array layer / depth slice (default 0). | |
| width | No | Region width (default: to the right edge, capped 1024). | |
| height | No | Region height (default: to the bottom edge, capped 1024). | |
| pageId | No | Page to read from. Optional when exactly one page is connected. | |
| mipLevel | No | Mip level (default 0). | |
| textureId | Yes | Numeric id of the GPU Texture OR TextureView object to read (a view is resolved to its texture). |