Contents

properties(with:)

Returns the complete list of material properties that match the specified material semantic.

Declaration

func properties(with semantic: MDLMaterialSemantic) -> [MDLMaterialProperty]

Parameters

  • semantic:

    The semantic value of a material property in the material.

Return Value

The material properties for the specified semantic, or an empty array 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 MDLMaterialSemantic.specular, are part of the material’s scatteringFunction property that determines its response to lighting. Another semantic value, such as MDLMaterialSemantic.opacity, determine the opacity of material rendering.

See Also

Working with individual material properties