One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

PortalMaterial.Program

struct · iOS 27.0+ · SDK 27.1

struct Program

A compiled shader program that drives the appearance of a portal's surface and geometry.

Members (2)

init · iOS 27.0+

init

TypeScript
static init(descriptor: PortalMaterial_Program_Descriptor): Promise<PortalMaterial_Program>
Swift declaration
init(descriptor: PortalMaterial.Program.Descriptor) async throws

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.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →