MDLMaterialProperty
A definition for one specific aspect of the rendering parameters for a material.
Declaration
class MDLMaterialPropertyOverview
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.
Topics
Creating a Material Property
init(name:semantic:)init(name:semantic:string:)init(name:semantic:url:)init(name:semantic:textureSampler:)init(name:semantic:color:)init(name:semantic:float:)init(name:semantic:float2:)init(name:semantic:float3:)init(name:semantic:float4:)init(name:semantic:matrix4x4:)