A definition for one specific aspect of the rendering parameters for a material.
- iOS 9.0+
- macOS 10.11+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- Model I/O
The collection of material properties in a
MDLMaterial instance defines the intended surface appearance for rendering a 3D object. A material property object’s
semantic property identifies which aspect of material rendering it affects, and its value (which can be any of several types) determines how the material property contributes to that aspect of rendering.
When you initialize a material property with a specific value (using one of the initializers listed in Creating a Material Property) or set the value of an existing material property (using one of the property setters listed in Working with a Material Property’s Value), the
type property changes to reflect the data type of the stored value. To retrieve the material property’s value, you must use the property accessor appropriate to its type. If you read a material property’s value using an accessor for a different type, the result is undefined.