Byte Engine Docs
Inspectorhttp

Capture a screenshot

GET/screenshots

Captures one image from a renderer sink. Without pass or target, the request reads the final swapchain image. Provide only target to read a scene-pipeline target after every scene pipeline has recorded, such as Diffuse Radiance History, or add pass to read a target right after that render pass. Add previous=true with a target to read the copy of a history target that the previous frame wrote, which is what the current frame's passes read as history. That copy holds no usable data on a sink's first frame or right after a resize. The request waits up to five seconds for a graphics frame to complete. To capture several images from the same frame, use POST /screenshots.

Query Parameters

sink*integer

Zero-based renderer sink index.

Range0 <= value
pass?string

Exact render-pass name. Requires target, and cannot be combined with previous.

Length1 <= length
target?string

Exact target name. Without pass, the name of a scene-pipeline target or history target. With pass, a target that the pass writes.

Length1 <= length
previous?boolean

Reads the previous frame's copy of a history target. Requires target without pass.

Defaultfalse
format?string

Image encoding. png is an 8-bit preview that clamps HDR values to [0, 1]. exr is a lossless OpenEXR image that keeps the texture's precision: half floats stay half floats, normalized values become linear 32-bit floats, and U32 stays U32. raw returns the texture bytes as the GPU stores them.

Default"png"

Value in

  • "png"
  • "exr"
  • "raw"

Response Body

text/plain

text/plain

text/plain

text/plain

text/plain

text/plain

curl -X GET "https://example.com/screenshots?sink=0&pass=bloom&target=Diffuse+Radiance+History"
"string"