SDL_GPUSamplerCreateInfo Struct Reference

`#include <SDL_gpu.h>`

## Data Fields

SDL_GPUFilter | min_filter
SDL_GPUFilter | mag_filter
SDL_GPUSamplerMipmapMode | mipmap_mode
SDL_GPUSamplerAddressMode | address_mode_u
SDL_GPUSamplerAddressMode | address_mode_v
SDL_GPUSamplerAddressMode | address_mode_w
float | mip_lod_bias
float | max_anisotropy
SDL_GPUCompareOp | compare_op
float | min_lod
float | max_lod
bool | enable_anisotropy
bool | enable_compare
Uint8 | padding1
Uint8 | padding2
SDL_PropertiesID | props

## Detailed Description

A structure specifying the parameters of a sampler.

Note that mip_lod_bias is a no-op for the Metal driver. For Metal, LOD bias must be applied via shader instead.

Since
  This function is available since SDL 3.2.0.

See also
  SDL_CreateGPUSampler
  SDL_GPUFilter
  SDL_GPUSamplerMipmapMode
  SDL_GPUSamplerAddressMode
  SDL_GPUCompareOp

Definition at line 1605 of file SDL_gpu.h.

## Field Documentation

## address_mode_u

SDL_GPUSamplerAddressMode SDL_GPUSamplerCreateInfo::address_mode_u

The addressing mode for U coordinates outside [0, 1).

Definition at line 1610 of file SDL_gpu.h.

## address_mode_v

SDL_GPUSamplerAddressMode SDL_GPUSamplerCreateInfo::address_mode_v

The addressing mode for V coordinates outside [0, 1).

Definition at line 1611 of file SDL_gpu.h.

## address_mode_w

SDL_GPUSamplerAddressMode SDL_GPUSamplerCreateInfo::address_mode_w

The addressing mode for W coordinates outside [0, 1).

Definition at line 1612 of file SDL_gpu.h.

## compare_op

SDL_GPUCompareOp SDL_GPUSamplerCreateInfo::compare_op

The comparison operator to apply to fetched data before filtering.

Definition at line 1615 of file SDL_gpu.h.

## enable_anisotropy

bool SDL_GPUSamplerCreateInfo::enable_anisotropy

true to enable anisotropic filtering.

Definition at line 1618 of file SDL_gpu.h.

## enable_compare

bool SDL_GPUSamplerCreateInfo::enable_compare

true to enable comparison against a reference value during lookups.

Definition at line 1619 of file SDL_gpu.h.

## mag_filter

SDL_GPUFilter SDL_GPUSamplerCreateInfo::mag_filter

The magnification filter to apply to lookups.

Definition at line 1608 of file SDL_gpu.h.

## max_anisotropy

float SDL_GPUSamplerCreateInfo::max_anisotropy

The anisotropy value clamp used by the sampler. If enable_anisotropy is false, this is ignored.

Definition at line 1614 of file SDL_gpu.h.

## max_lod

float SDL_GPUSamplerCreateInfo::max_lod

Clamps the maximum of the computed LOD value.

Definition at line 1617 of file SDL_gpu.h.

## min_filter

SDL_GPUFilter SDL_GPUSamplerCreateInfo::min_filter

The minification filter to apply to lookups.

Definition at line 1607 of file SDL_gpu.h.

## min_lod

float SDL_GPUSamplerCreateInfo::min_lod

Clamps the minimum of the computed LOD value.

Definition at line 1616 of file SDL_gpu.h.

## mip_lod_bias

float SDL_GPUSamplerCreateInfo::mip_lod_bias

The bias to be added to mipmap LOD calculation.

Definition at line 1613 of file SDL_gpu.h.

## mipmap_mode

SDL_GPUSamplerMipmapMode SDL_GPUSamplerCreateInfo::mipmap_mode

The mipmap filter to apply to lookups.

Definition at line 1609 of file SDL_gpu.h.

## padding1

Uint8 SDL_GPUSamplerCreateInfo::padding1

Definition at line 1620 of file SDL_gpu.h.

## padding2

Uint8 SDL_GPUSamplerCreateInfo::padding2

Definition at line 1621 of file SDL_gpu.h.

## props

SDL_PropertiesID SDL_GPUSamplerCreateInfo::props

A properties ID for extensions. Should be 0 if no extensions are needed.

Definition at line 1623 of file SDL_gpu.h.

The documentation for this struct was generated from the following file:

- SDL_gpu.h