Initializer

init(name:scatteringFunction:)

Initializes a material

Declaration

init(name: String, scatteringFunction: MDLScatteringFunction)

Parameters

name

A descriptive name for the material.

scatteringFunction

The collection of material properties that define the material’s response to light. For details, see the scatteringFunction property.

Return Value

A new material object.

Discussion

To use the newly created material with a 3D object, assign it to the the material property of a MDLSubmesh instance.

See Also

Creating a Material

init(scnMaterial: SCNMaterial)

Creates a material object from the specified SceneKit material object.