Contents

MDLMaterial

A collection of material properties that together describe the intended surface appearance for rendering a 3D object.

Declaration

class MDLMaterial

Overview

Each material property (a MDLMaterialProperty object) provides one specific aspect of appearance, such as opacity, shininess, or surface detail. Use the material property of a MDLSubmesh object to associate a material with a 3D object for rendering or to find the material assigned to an object loaded from an asset file.

Sets of certain material properties called scattering functions determine the material’s response to lighting. You can manage these properties together using a material’s scatteringFunction property. Creating a material with the inherited init() initializer is equivalent to using the init(name:scatteringFunction:) with a MDLScatteringFunction object whose properties all have default values.

Topics

Creating a material

Using a material

Determining a material’s response to lighting

Working with individual material properties

Sharing material properties

Accessing material properties with subscript syntax

Working with textures using resolvers

See Also

Materials