Overview#
Sensor Processing Graphs (SPG) enables running custom GPU code as post-processing passes on RTX render outputs (Arbitrary Output Variables, or AOVs). You write a CUDA kernel or a Slang shader, describe its launch configuration in a Lua script, declare its interface in USD, and wire it into a RenderProduct. The data a node reads and writes stays on the GPU.
This guide assumes proficiency with CUDA kernel programming or Slang Shader programming and basic familiarity with USD (Universal Scene Description).
How SPG Works#
Every SPG node you write is defined by three files:
File |
Role |
|---|---|
|
GPU source. The transform you write, in CUDA or in Slang. |
|
Lua launch script. Named after the GPU source. Tells SPG how to validate the inputs, what the outputs have to be, and how to launch the GPU code. |
|
USD shader definition. Declares the SPG node with its inputs and outputs in USD and references the GPU source. Wired into the render graph. |
Finding Your Way#
The pages after this one come in four kinds:
Section |
Purpose |
|---|---|
Walkthrough. Builds one node, step by step. |
|
One page per task. Find the one you need. |
|
Lookup. Every Lua function and every USD attribute you can author. |
|
Symptoms. Starts from what you observed rather than from what you meant to do. |