shaderGraph
TypeScriptget shaderGraph(): SDKHandleSwift declarationvar shaderGraph: ShaderGraphThe shader graph that describes the shading logic for this program.
struct · iOS 27.0+ · SDK 27.1
struct Descriptorget shaderGraph(): SDKHandleSwift declarationvar shaderGraph: ShaderGraphThe shader graph that describes the shading logic for this program.
set shaderGraph(value: SDKHandle)Swift declarationvar shaderGraph: ShaderGraphThe shader graph that describes the shading logic for this program.
static initShaderGraphLightingModelIsColorDitheringEnabledBlendModeInputValuesConstantValues(shaderGraph: SDKHandle, lightingModel: LightingModel, isColorDitheringEnabled?: boolean, blendMode?: (MaterialParameterTypes_BlendMode) | null, inputValues?: Record<string, MaterialParameters_Value>, constantValues?: _Metal_MTLFunctionConstantValues): ShaderGraphMaterial_Program_DescriptorSwift declarationinit(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 inputValues(): Record<string, MaterialParameters_Value>Swift declarationvar inputValues: [String : MaterialParameters.Value]Initial values for the inputs declared in ``shaderNodeGraph``.
set inputValues(value: Record<string, MaterialParameters_Value>)Swift declarationvar inputValues: [String : MaterialParameters.Value]Initial values for the inputs declared in ``shaderNodeGraph``.
static initInferredFromInputValuesConstantValues(graph: SDKHandle, inputValues?: Record<string, MaterialParameters_Value>, constantValues?: _Metal_MTLFunctionConstantValues): ShaderGraphMaterial_Program_DescriptorSwift declarationinit(inferredFrom graph: ShaderGraph, inputValues: [String : MaterialParameters.Value] = [:], constantValues: MTLFunctionConstantValues = .init()) throwsCreates 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 lightingModel(): LightingModelSwift declarationvar lightingModel: LightingModelThe lighting model to use when rendering this material. Must match the type of the surface output node in ``shaderGraph``.
set lightingModel(value: LightingModel)Swift declarationvar lightingModel: LightingModelThe lighting model to use when rendering this material. Must match the type of the surface output node in ``shaderGraph``.
get constantValues(): _Metal_MTLFunctionConstantValuesSwift declarationvar constantValues: MTLFunctionConstantValuesValues 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 constantValues(value: _Metal_MTLFunctionConstantValues)Swift declarationvar constantValues: MTLFunctionConstantValuesValues 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 isColorDitheringEnabled(): booleanSwift declarationvar isColorDitheringEnabled: BoolWhether to dither color values before writing to the frame buffer. Enable this to reduce color banding artifacts on gradients.
set isColorDitheringEnabled(value: boolean)Swift declarationvar isColorDitheringEnabled: BoolWhether to dither color values before writing to the frame buffer. Enable this to reduce color banding artifacts on gradients.
get blendMode(): (MaterialParameterTypes_BlendMode) | nullSwift declarationvar blendMode: MaterialParameterTypes.BlendMode?How materials using this program blend with content behind them. When `nil`, the material renders opaque.
set blendMode(value: (MaterialParameterTypes_BlendMode) | null)Swift declarationvar blendMode: MaterialParameterTypes.BlendMode?How materials using this program blend with content behind them. When `nil`, the material renders opaque.
No declarations were skipped in this snapshot.