Instance Method

setFragmentTexture(_:index:)

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

Required.

Declaration

func setFragmentTexture(_ texture: MTLTexture?, index: Int)

Parameters

texture

The texture to set in the argument table.

index

The index in the texture argument table.

Discussion

The default texture 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?, index: Int)

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

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 setFragmentTextures([MTLTexture?], range: Range<Int>)

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