One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

ShaderGraphMaterial.Program.Descriptor

struct · iOS 27.0+ · SDK 27.1

struct Descriptor

Members (14)

get · iOS 27.0+

shaderGraph

TypeScript
get shaderGraph(): SDKHandle
Swift declaration
var shaderGraph: ShaderGraph

The shader graph that describes the shading logic for this program.

set · iOS 27.0+

shaderGraph

TypeScript
set shaderGraph(value: SDKHandle)
Swift declaration
var shaderGraph: ShaderGraph

The shader graph that describes the shading logic for this program.

init · iOS 27.0+

init

TypeScript
static initShaderGraphLightingModelIsColorDitheringEnabledBlendModeInputValuesConstantValues(shaderGraph: SDKHandle, lightingModel: LightingModel, isColorDitheringEnabled?: boolean, blendMode?: (MaterialParameterTypes_BlendMode) | null, inputValues?: Record<string, MaterialParameters_Value>, constantValues?: _Metal_MTLFunctionConstantValues): ShaderGraphMaterial_Program_Descriptor
Swift declaration
init(shaderGraph: ShaderGraph, lightingModel: LightingModel, isColorDitheringEnabled: Bool = false, blendMode: MaterialParameterTypes.BlendMode? = nil, inputValues: [String : MaterialParameters.Value] = [:], constantValues: MTLFunctionConstantValues = .init())

Creates a descriptor with explicit configuration.

get · iOS 27.0+

inputValues

TypeScript
get inputValues(): Record<string, MaterialParameters_Value>
Swift declaration
var inputValues: [String : MaterialParameters.Value]

Initial values for the inputs declared in ``shaderNodeGraph``.

set · iOS 27.0+

inputValues

TypeScript
set inputValues(value: Record<string, MaterialParameters_Value>)
Swift declaration
var inputValues: [String : MaterialParameters.Value]

Initial values for the inputs declared in ``shaderNodeGraph``.

init · iOS 27.0+

init

TypeScript
static initInferredFromInputValuesConstantValues(graph: SDKHandle, inputValues?: Record<string, MaterialParameters_Value>, constantValues?: _Metal_MTLFunctionConstantValues): ShaderGraphMaterial_Program_Descriptor
Swift declaration
init(inferredFrom graph: ShaderGraph, inputValues: [String : MaterialParameters.Value] = [:], constantValues: MTLFunctionConstantValues = .init()) throws

Creates a descriptor by inferring configuration from a shader graph. Analyzes node connections to determine the appropriate lighting model and settings — for example, enabling clearcoat if the graph connects to the clearcoat output. This initializer will not infer default values of inputs or function constants. - Parameter inferredFrom: The graph to infer configuration from.

get · iOS 27.0+

lightingModel

TypeScript
get lightingModel(): LightingModel
Swift declaration
var lightingModel: LightingModel

The lighting model to use when rendering this material. Must match the type of the surface output node in ``shaderGraph``.

set · iOS 27.0+

lightingModel

TypeScript
set lightingModel(value: LightingModel)
Swift declaration
var lightingModel: LightingModel

The lighting model to use when rendering this material. Must match the type of the surface output node in ``shaderGraph``.

get · iOS 27.0+

constantValues

TypeScript
get constantValues(): _Metal_MTLFunctionConstantValues
Swift declaration
var constantValues: MTLFunctionConstantValues

Values for the function constant inputs declared in ``shaderNodeGraph``. Function constants are compiled directly into the shader and cannot be changed after the program is created.

set · iOS 27.0+

constantValues

TypeScript
set constantValues(value: _Metal_MTLFunctionConstantValues)
Swift declaration
var constantValues: MTLFunctionConstantValues

Values for the function constant inputs declared in ``shaderNodeGraph``. Function constants are compiled directly into the shader and cannot be changed after the program is created.

get · iOS 27.0+

isColorDitheringEnabled

TypeScript
get isColorDitheringEnabled(): boolean
Swift declaration
var isColorDitheringEnabled: Bool

Whether to dither color values before writing to the frame buffer. Enable this to reduce color banding artifacts on gradients.

set · iOS 27.0+

isColorDitheringEnabled

TypeScript
set isColorDitheringEnabled(value: boolean)
Swift declaration
var isColorDitheringEnabled: Bool

Whether to dither color values before writing to the frame buffer. Enable this to reduce color banding artifacts on gradients.

get · iOS 27.0+

blendMode

TypeScript
get blendMode(): (MaterialParameterTypes_BlendMode) | null
Swift declaration
var blendMode: MaterialParameterTypes.BlendMode?

How materials using this program blend with content behind them. When `nil`, the material renders opaque.

set · iOS 27.0+

blendMode

TypeScript
set blendMode(value: (MaterialParameterTypes_BlendMode) | null)
Swift declaration
var blendMode: MaterialParameterTypes.BlendMode?

How materials using this program blend with content behind them. When `nil`, the material renders opaque.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →