cuda.core.textures.TextureDescriptor#

class cuda.core.textures.TextureDescriptor(
address_mode: AddressMode | tuple[AddressMode, ...] = AddressMode.CLAMP,
filter_mode: FilterMode = FilterMode.POINT,
read_mode: ReadMode = ReadMode.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: FilterMode = FilterMode.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 AddressMode (applied to all axes) or a tuple of 1-3 entries (one per dimension).

Type:

tuple of AddressMode

filter_mode#

Texel sampling mode. Default POINT.

Type:

FilterMode

read_mode#

How sampled integer values are returned. Default ELEMENT_TYPE.

Type:

ReadMode

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:

FilterMode

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