Contents

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.