Development

Write a custom pass

Derive the pass from the appropriate raster, compute, or ray-tracing pass contract and give it concrete input and output types. Separate persistent preparation from per-frame setup and recording. Use the graph’s resource builder to make each access visible to graph compilation.

Describe resource intent

Declare the access used by the command, such as a sampled read, storage write, color output, or depth access. A graph name identifies a logical resource. Attachment, mip, layer, format, and expected usage remain part of its concrete contract. A shader descriptor that reads a graph resource must have a matching declared access. Binding a descriptor is insufficient to add a scheduling edge.

Use external resources for resources owned by the host or another system. Identify the actual imported handle at submission or preparation as the contract requires. Transient resources are graph-owned. Keep the transient lifetime inside its graph until an explicit export or temporal mechanism extends it.

Prepare, then record

Prepare shaders, material descriptor plans, pipelines, and persistent GPU state with the pass preparation hook. Graph preparation owns the schedule for those hooks. A pass can opt into overlapping preparation only when its mutable work obeys the resource authority and threading contract.

Per-frame setup computes inputs and selects ready state. Recording uses the typed context and declared resources to emit work. It should not compile a shader in response to a missing program. Report preparation failures before publishing a terminal that uses the pass.

For a complete pass type, typed registration, and output declaration see Frame graphs and typed render profiles. It writes an external color target with RecordClearColor and requires no material or shader.