---
title: "setVertexSamplerStates:lodMinClamps:lodMaxClamps:withRange:"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlrendercommandencoder/setvertexsamplerstates:lodminclamps:lodmaxclamps:withrange:"
---

# setVertexSamplerStates:lodMinClamps:lodMaxClamps:withRange:

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

## Declaration

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

## Parameters

- `samplers`: A pointer to a C array of doc://com.apple.metal/documentation/Metal/MTLSamplerState instances the command assigns to entries in the vertex 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 vertex 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 vertex 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 vertex shader argument table for sampler states. Each entry stores a record of the corresponding element in samplers.

## Discussion

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. note: The Swift version of this method is setVertexSamplerStates(_:lodMinClamps:lodMaxClamps:range:).

## See Also

### Assigning sampler states

- [setVertexSamplerState(_:index:)](metal/mtlrendercommandencoder/setvertexsamplerstate(_:index:).md)
- [setVertexSamplerState(_:lodMinClamp:lodMaxClamp:index:)](metal/mtlrendercommandencoder/setvertexsamplerstate(_:lodminclamp:lodmaxclamp:index:).md)
- [setVertexSamplerStates:withRange:](metal/mtlrendercommandencoder/setvertexsamplerstates:withrange:.md)
