D3DSAMPLERSTATETYPE enumeration

Sampler states define texture sampling operations such as texture addressing and texture filtering. Some sampler states set-up vertex processing, and some set-up pixel processing. Sampler states can be saved and restored using stateblocks (see State Blocks Save and Restore State (Direct3D 9)).

Syntax

typedef enum D3DSAMPLERSTATETYPE { 
  D3DSAMP_ADDRESSU       = 1,
  D3DSAMP_ADDRESSV       = 2,
  D3DSAMP_ADDRESSW       = 3,
  D3DSAMP_BORDERCOLOR    = 4,
  D3DSAMP_MAGFILTER      = 5,
  D3DSAMP_MINFILTER      = 6,
  D3DSAMP_MIPFILTER      = 7,
  D3DSAMP_MIPMAPLODBIAS  = 8,
  D3DSAMP_MAXMIPLEVEL    = 9,
  D3DSAMP_MAXANISOTROPY  = 10,
  D3DSAMP_SRGBTEXTURE    = 11,
  D3DSAMP_ELEMENTINDEX   = 12,
  D3DSAMP_DMAPOFFSET     = 13,
  D3DSAMP_FORCE_DWORD    = 0x7fffffff
} D3DSAMPLERSTATETYPE, *LPD3DSAMPLERSTATETYPE;

Constants

D3DSAMP_ADDRESSU

Texture-address mode for the u coordinate. The default is D3DTADDRESS_WRAP. For more information, see D3DTEXTUREADDRESS.

D3DSAMP_ADDRESSV

Texture-address mode for the v coordinate. The default is D3DTADDRESS_WRAP. For more information, see D3DTEXTUREADDRESS.

D3DSAMP_ADDRESSW

Texture-address mode for the w coordinate. The default is D3DTADDRESS_WRAP. For more information, see D3DTEXTUREADDRESS.

D3DSAMP_BORDERCOLOR

Border color or type D3DCOLOR. The default color is 0x00000000.

D3DSAMP_MAGFILTER

Magnification filter of type D3DTEXTUREFILTERTYPE. The default value is D3DTEXF_POINT.

D3DSAMP_MINFILTER

Minification filter of type D3DTEXTUREFILTERTYPE. The default value is D3DTEXF_POINT.

D3DSAMP_MIPFILTER

Mipmap filter to use during minification. See D3DTEXTUREFILTERTYPE. The default value is D3DTEXF_NONE.

D3DSAMP_MIPMAPLODBIAS

Mipmap level-of-detail bias. The default value is zero.

D3DSAMP_MAXMIPLEVEL

level-of-detail index of largest map to use. Values range from 0 to (n - 1) where 0 is the largest. The default value is zero.

D3DSAMP_MAXANISOTROPY

DWORD maximum anisotropy. Values range from 1 to the value that is specified in the MaxAnisotropy member of the D3DCAPS9 structure. The default value is 1.

D3DSAMP_SRGBTEXTURE

Gamma correction value. The default value is 0, which means gamma is 1.0 and no correction is required. Otherwise, this value means that the sampler should assume gamma of 2.2 on the content and convert it to linear (gamma 1.0) before presenting it to the pixel shader.

D3DSAMP_ELEMENTINDEX

When a multielement texture is assigned to the sampler, this indicates which element index to use. The default value is 0.

D3DSAMP_DMAPOFFSET

Vertex offset in the presampled displacement map. This is a constant used by the tessellator, its default value is 0.

D3DSAMP_FORCE_DWORD

Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used.

Requirements

Requirement Value
Header
D3D9Types.h

See also

Direct3D Enumerations