Instance Property

scatteringFunction

The collection of material properties that define the material’s response to light.

Declaration

var scatteringFunction: MDLScatteringFunction { get }

Discussion

A MDLScatteringFunction object defines a Bidirectional Reflectance Distribution Function (BRDF), which determines how a material interacts with lighting to produce a surface appearance. Though you can access the individual material properties in a scattering function directly, a scattering function object lets you work with the collection of lighting-related material properties as a single unit. Use the MDLScatteringFunction class itself to describe a classical Lambertian/Blinn-Phong shading model, or the MDLPhysicallyPlausibleScatteringFunction class to describe a shading model based more closely on real-world physics.

A scattering function determines lighting-related aspects of a material’s appearance, but not all aspects. For features such as opacity and surface deformation, use the methods listed in Working with Individual Material Properties to access the corresponding material properties.

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