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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software