Contents

setMeshSamplerStates:lodMinClamps:lodMaxClamps:withRange:

Assigns multiple sampler states and clamp values to a range of entries in the mesh shader argument table.

Declaration

- (void) setMeshSamplerStates:(id<MTLSamplerState> const[]) samplers lodMinClamps:(const float[]) lodMinClamps lodMaxClamps:(const float[]) lodMaxClamps withRange:(NSRange) range;

Parameters

  • samplers:

    A pointer to a C array of Mtlsamplerstate instances the command assigns to entries in the mesh shader argument table for sampler states.

  • lodMinClamps:

    A pointer to a C array of floating-point values. Each element is the smallest level of detail value a mesh shader can use when it samples a texture with the corresponding element in samplers.

  • lodMaxClamps:

    A pointer to a C array of floating-point values. Each element is the largest level of detail value a mesh shader can use when it samples a texture with the corresponding element in samplers.

  • range:

    A span of integers that represent the entries in the mesh shader argument table for sampler states. Each entry stores a record of the corresponding element in samplers.

Discussion

Each element of the method’s lodMinClamps and lodMaxClamps parameters overrides the default values for the corresponding sampler in samplers. You can set a 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.

See Also

Assigning sampler states for mesh shaders