Enumeration

MTLSamplerAddressMode

Modes that determine the texture coordinate at each pixel when a fetch falls outside the bounds of a texture.

Declaration

typedef enum MTLSamplerAddressMode : NSUInteger {
    ...
} MTLSamplerAddressMode;

Topics

Address Mode Options

MTLSamplerAddressModeClampToEdge

Texture coordinates are clamped between 0.0 and 1.0, inclusive.

MTLSamplerAddressModeMirrorClampToEdge

Between -1.0 and 1.0, the texture coordinates are mirrored across the axis; outside -1.0 and 1.0, texture coordinates are clamped.

MTLSamplerAddressModeRepeat

Texture coordinates wrap to the other side of the texture, effectively keeping only the fractional part of the texture coordinate.

MTLSamplerAddressModeMirrorRepeat

Between -1.0 and 1.0, the texture coordinates are mirrored across the axis; outside -1.0 and 1.0, the image is repeated.

MTLSamplerAddressModeClampToZero

Out-of-range texture coordinates return transparent zero (0,0,0,0) for images with an alpha channel and return opaque zero (0,0,0,1) for images without an alpha channel.

MTLSamplerAddressModeClampToBorderColor

Out-of-range texture coordinates return the value specified by the borderColor property.

See Also

Declaring Addressing Modes

rAddressMode

The address mode for the texture depth (r) coordinate.

sAddressMode

The address mode for the texture width (s) coordinate.

tAddressMode

The address mode for the texture height (t) coordinate.

borderColor

The border color for clamped texture values.

MTLSamplerBorderColor

Values that determine the border color for clamped texture values when the sampler address mode is MTLSamplerAddressModeClampToBorderColor.