An object that defines how a texture should be sampled.
- iOS 8.0+
- macOS 10.11+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
MTLSampler protocol defines the interface for a lightweight object used to encode how a shader or compute kernel should sample a texture. To create a sampler state object:
Set the desired properties of the sampler descriptor, including filtering options, addressing modes, maximum anisotropy, and level-of-detail parameters.
(Your app does not define a class that implements the
You can either release the
MTLSampler object or modify its property values and reuse it to create more
MTLSampler objects. The descriptor's properties are only used during object creation; once created the behavior of a sampler state object is fixed and cannot be changed.