setObjectSamplerState(_:lodMinClamp:lodMaxClamp:index:)
Assigns a sampler state and clamp values to an entry in the object shader argument table.
Declaration
func setObjectSamplerState(_ sampler: (any MTLSamplerState)?, lodMinClamp: Float, lodMaxClamp: Float, index: Int)Parameters
- sampler:
An Mtlsamplerstate instance the command assigns to an entry in the object shader argument table for sampler states.
- lodMinClamp:
The smallest level of detail value an object shader can use when it samples a texture.
- lodMaxClamp:
The largest level of detail value an object shader can use when it samples a texture.
- index:
An integer that represents the entry in the object argument table for sampler states that stores a record of
sampler.
Discussion
The method’s lodMinClamp and lodMaxClamp parameters override the default values for sampler. You can set the sampler’s default values by configuring the lodMinClamp and lodMaxClamp properties of MTLSamplerDescriptor before you create the sampler.
By default, the sampler state at each index is nil.