Instance Method

propertyWithSemantic:

Returns the material property for the specified material semantic.

Declaration

- (MDLMaterialProperty *)propertyWithSemantic:(MDLMaterialSemantic)semantic;

Parameters

semantic

The semantic value of a material property in the material.

Return Value

The material property for the specified semantic, or nil if the material does not contain a material property for that semantic.

Discussion

Material semantics identify the intended use of a material property in shading. Some semantic values, such as MDLMaterialSemanticSpecular, are part of the material’s scatteringFunction property that determines its response to lighting; others, such as MDLMaterialSemanticOpacity, determine other aspects of material rendering.

See Also

Working with Individual Material Properties

- propertyNamed:

Returns the material property with the specified name.

- setProperty:

Adds a new material property to or replaces an existing material property in the material.

- removeProperty:

Removes the specified material property from the material.

- removeAllProperties

Removes all material properties from the material.

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