How-To#

One page per thing a node or a graph can do. These are not written to be read in order. Each page states its goal, what it assumes you already have, the shape of the solution, how to confirm it worked, and what to check when it does not.

Both languages appear on the same page. Where CUDA and Slang differ, each is shown in its own tab rather than in a separate chapter. For the surface each task draws on, refer to Reference.

Write a Node#

Task

Goal

Types and Values

Give a node a number, vector or matrix authored in USD, and read it in the GPU code.

Choose a Resource’s Backing

Decide whether a resource is texture-backed or buffer-backed, and bind it correctly.

Upload Your Own Data

Get a lookup table, a filter kernel or any authored array onto the GPU.

Control the Launch Geometry

Decide how many GPU threads run, and over what.

Compile It Yourself

Build the GPU code with your own toolchain, or split it across files.

Wire a Graph#

Task

Goal

Chain Nodes

Feed one node’s output straight into the next, without publishing the intermediate.

Split and Join

Feed one node’s output to several consumers, or several producers into one node.

Publish, Overwrite and Read Back AOVs

Decide what a graph exposes to the rest of the pipeline, and get it back on the host.

Work Across Render Products

Read an AOV produced by a different RenderProduct, or drive several products at once.

Write a Node With No Input

Build an AOV out of authored values alone, with no AOV coming in.

Use a Built-In Node

Get a common operation without writing any GPU code.

Across Frames#

Task

Goal

Keep State Across Frames

Let a node read what it wrote last frame.

Read a Previous Frame

Read an AOV as it was N frames ago.

Cache Work Across Frames

Compute something once instead of every frame.

Change Values and Rewire

Retune or rewire a graph without reloading the scene.

Reach Beyond an AOV#

Task

Goal

Read a Sensor Composite

Consume a lidar or radar point cloud in a node.

Trace the Scene

Have a node render the scene itself rather than transform an AOV.

Slang Specifics#

Task

Goal

Bind Resources and Descriptor Spaces

Place resources into specific descriptor spaces, and state a constant buffer’s layout.