Compiles a program from the given descriptor.
Compilation translates the descriptor's shader graph into a Metal
function library, bakes in the descriptor's function constant values,
and links the result into a ``PortalMaterial``-compatible artifact.
The work is asynchronous; build programs once during scene setup
and reuse them across every material that needs them.
- Parameter descriptor: A configuration that pairs a shader graph
with initial input values and function constant values.
- Throws: An error if the shader graph is invalid, if a required
built-in portal asset can't be located, or if shader compilation
fails.
get · iOS 27.0+
descriptor
TypeScript
get descriptor(): PortalMaterial_Program_Descriptor
Swift declaration
var descriptor: PortalMaterial.Program.Descriptor { get }
The descriptor that produced this program.
Use this property to inspect the shader graph and the input or
function-constant values that were used to compile the program — for
example, to enumerate the input names a parent material can set, or
to construct a fresh descriptor with adjusted constants and recompile.