cuda.core.texture.TextureObjectOptions#

class cuda.core.texture.TextureObjectOptions(
address_mode: AddressModeType | tuple[AddressModeType, ...] = AddressModeType.CLAMP,
filter_mode: FilterModeType = FilterModeType.POINT,
read_mode: ReadModeType = ReadModeType.ELEMENT_TYPE,
normalized_coords: bool = False,
srgb: bool = False,
disable_trilinear_optimization: bool = False,
seamless_cubemap: bool = False,
max_anisotropy: int = 0,
mipmap_filter_mode: FilterModeType = FilterModeType.POINT,
mipmap_level_bias: float = 0.0,
min_mipmap_level_clamp: float = 0.0,
max_mipmap_level_clamp: float = 0.0,
border_color: tuple[float, ...] | None = None,
)#

Sampling state for a TextureObject (mirrors CUDA_TEXTURE_DESC).

address_mode#

Boundary behavior per axis. May be a single AddressModeType (applied to all axes) or a tuple of 1-3 entries (one per dimension). Plain strings are accepted.

Type:

AddressModeType or tuple of AddressModeType

filter_mode#

Texel sampling mode. Default POINT.

Type:

FilterModeType

read_mode#

How sampled integer values are returned. Default ELEMENT_TYPE.

Type:

ReadModeType

normalized_coords#

If True, coordinates are in [0, 1] instead of pixel indices.

Type:

bool

srgb#

If True, perform sRGB → linear conversion on read (8-bit formats only).

Type:

bool

disable_trilinear_optimization#

If True, request exact trilinear filtering.

Type:

bool

seamless_cubemap#

If True, enable seamless cubemap edge filtering.

Type:

bool

max_anisotropy#

Maximum anisotropy; 0 disables anisotropic filtering.

Type:

int

mipmap_filter_mode#

Filtering between mipmap levels. Default POINT.

Type:

FilterModeType

mipmap_level_bias#
Type:

float

min_mipmap_level_clamp#
Type:

float

max_mipmap_level_clamp#
Type:

float

border_color#

4-tuple used when address_mode includes BORDER; None means zero.

Type:

tuple of float or None

.. versionadded:: 1.1.0