Python: SPG Built-In Nodes#

Not every SPG node needs a custom CUDA kernel. SPG ships built-in factory nodes that you author with info:implementationSource = "id" and an info:id — no .cu or .cu.lua required. This example chains two stdlib nodes: Add doubles the LdrColor AOV’s brightness by adding it to itself (saturating at 255), then Scale downscales that result to half resolution.

This example uses the deprecated renderer scene-loading API so it can remain focused on SPG authoring. Use the 0.3-to-0.4 migration skill when moving scene management to ovstage.

“Chain two built-in SPG nodes (no custom CUDA) that brighten the color output and downscale it to half resolution, wired into a RenderProduct via info:id.”

SPG built-in node example output

Prerequisites#

  • Python 3.10-3.13

  • uv

  • An NVIDIA RTX-capable GPU and a supported driver

Running#

uv run main.py

A successful run writes _output/input.png and _output/downscaled.png. See Available Standard Library Nodes for the full catalog of built-in nodes.