Instance Method

setFragmentSamplerState(_:index:)

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

Required.

Declaration

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

Parameters

sampler

The sampler state to set in the argument table.

index

The index in the sampler argument table.

Discussion

The default sampler state at each index is nil.

See Also

Specifying Arguments 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?, lodMinClamp: Float, lodMaxClamp: Float, index: Int)

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.

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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software