Instance Method

setFragmentSamplerState(_:lodMinClamp:lodMaxClamp:index:)

Sets a sampler state for the fragment function at an index in the sampler state argument table, specifying clamp values for the minimum and maximum level of detail.

Required.

Declaration

func setFragmentSamplerState(_ sampler: MTLSamplerState?, lodMinClamp: Float, lodMaxClamp: Float, index: Int)

Parameters

sampler

The sampler state to set in the argument table.

lodMinClamp

The minimum level of detail used when sampling a texture.

lodMaxClamp

The maximum level of detail used when sampling a texture.

index

The index in the sampler argument table.

Discussion

When this method is used, the clamp values of the lodMinClamp and lodMaxClamp properties of the sampler state are ignored.

The default sampler state at each index is nil.

See Also

Specifying Resources for a Fragment Function

func setFragmentBuffer(MTLBuffer?, offset: Int, index: Int)

Sets a buffer for the fragment function.

Required.

func setFragmentBuffers([MTLBuffer?], offsets: [Int], range: Range<Int>)

Sets an array of buffers for the fragment function in a range of indices in the buffer argument table.

func setFragmentBufferOffset(Int, index: Int)

Sets where the data begins in a buffer already bound to the fragment shader.

Required.

func setFragmentBytes(UnsafeRawPointer, length: Int, index: Int)

Sets a block of data for the fragment shader.

Required.

func setFragmentSamplerState(MTLSamplerState?, index: Int)

Sets a sampler state for the fragment function at an index in the sampler state argument table.

Required.

func setFragmentSamplerStates([MTLSamplerState?], lodMinClamps: [Float], lodMaxClamps: [Float], range: Range<Int>)

Sets sampler states for the fragment function in a range of indices in the sampler state argument table, specifying clamp values for levels of detail.

func setFragmentSamplerStates([MTLSamplerState?], range: Range<Int>)

Sets an array of sampler states for the fragment shader function in a range of indices in the sampler state argument table.

func setFragmentTexture(MTLTexture?, index: Int)

Sets a texture for the fragment function at an index in the texture argument table.

Required.

func setFragmentTextures([MTLTexture?], range: Range<Int>)

Sets an array of textures for the fragment function in a range of indices in the texture argument table.