Instance Property

base

Another material object from which this material’s properties are derived.

Declaration

var base: MDLMaterial? { get set }

Discussion

When you use the property(with:), propertyNamed(_:), or subscript(_:) method to access material properties, the MDLMaterial class first checks whether the material itself has a material property with the specified name or semantic. If not, those methods forward to the corresponding method of the other MDLMaterial object specified by this property.

Use this method to create sets of materials that share most of their material properties but differ in others. For example, you can have a set of objects in the same scene with the same general style of surface appearance (determined by the scatteringFunction property) but with different values for the baseColor material property.

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