D3D11_SAMPLER_DESC Structure

The D3D11_SAMPLER_DESC structure describes the sampler state for a shader.

Syntax


struct D3D11_SAMPLER_DESC {
  D3D11_FILTER               Filter;
  D3D11_TEXTURE_ADDRESS_MODE AddressU;
  D3D11_TEXTURE_ADDRESS_MODE AddressV;
  D3D11_TEXTURE_ADDRESS_MODE AddressW;
  FLOAT                      MipLODBias;
  UINT                       MaxAnisotropy;
  D3D11_COMPARISON_FUNC      ComparisonFunc;
  FLOAT                      BorderColor[4];
  FLOAT                      MinLOD;
  FLOAT                      MaxLOD;
};
            

Members

Member Description
Filter A D3D11_FILTER enumerated type that specifies the texture filtering type.
AddressU A D3D11_TEXTURE_ADDRESS_MODE enumerated type that specifies how to address texels in the U dimension (or S dimension).
AddressV A D3D11_TEXTURE_ADDRESS_MODE enumerated type that specifies how to address texels in the V dimension (or T dimension).
AddressW A D3D11_TEXTURE_ADDRESS_MODE enumerated type that specifies how to address texels in the W dimension (or R dimension).
MipLODBias Offset from the calculated mipmap level. The range is -14 to +14.
MaxAnisotropy The maximum anisotropy for anisotropic filtering. The range is 1 to 16.
ComparisonFunc A D3D11_COMPARISON_FUNC enumerated type that specifies the comparison function to use for depth or stencil texture lookups.
BorderColor A FLOAT array of 4 elements that describes the border color to use when AddressU, AddressV, or AddressW is set to D3D11_TEXTURE_ADDRESS_BORDER. The array elements are RGBA.
MinLOD The lower end of the mipmap range to clamp LOD to.
MaxLOD The upper end of the mipmap range to clamp LOD to.

Remarks

To create a sampler state, pass a pointer to the sampler state description to the ID3D11Device::CreateSamplerState method.

See Also