Contents

setSamplerState(_:index:)

Encodes a texture sampler, allowing compute kernels to use it for sampling textures on the GPU.

Declaration

func setSamplerState(_ sampler: (any MTLSamplerState)?, index: Int)

Parameters

  • sampler:

    An Mtlsamplerstate instance to bind to the sampler argument table.

  • index:

    The index in the sampler argument table to bind the sampler to.

See Also

Binding texture samplers