D3D11_SAMPLER_DESC Structure

Describes a sampler state.

Syntax

typedef 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;
} D3D11_SAMPLER_DESC;

Mitglieder

  • Filter
    Typ: D3D11_FILTER

    Filtering method to use when sampling a texture (see D3D11_FILTER).

  • AddressU
    Typ: D3D11_TEXTURE_ADDRESS_MODE

    Method to use for resolving a u texture coordinate that is outside the 0 to 1 range (see D3D11_TEXTURE_ADDRESS_MODE).

  • AddressV
    Typ: D3D11_TEXTURE_ADDRESS_MODE

    Method to use for resolving a v texture coordinate that is outside the 0 to 1 range.

  • AddressW
    Typ: D3D11_TEXTURE_ADDRESS_MODE

    Method to use for resolving a w texture coordinate that is outside the 0 to 1 range.

  • MipLODBias
    Typ: FLOAT

    Offset from the calculated mipmap level. For example, if Direct3D calculates that a texture should be sampled at mipmap level 3 and MipLODBias is 2, then the texture will be sampled at mipmap level 5.

  • MaxAnisotropy
    Typ: UINT

    Clamping value used if D3D11_FILTER_ANISOTROPIC or D3D11_FILTER_COMPARISON_ANISOTROPIC is specified in Filter. Valid values are between 1 and 16.

  • ComparisonFunc
    Typ: D3D11_COMPARISON_FUNC

    A function that compares sampled data against existing sampled data. The function options are listed in D3D11_COMPARISON_FUNC.

  • BorderColor
    Typ: FLOAT

    Border color to use if D3D11_TEXTURE_ADDRESS_BORDER is specified for AddressU, AddressV, or AddressW. Range must be between 0.0 and 1.0 inclusive.

  • MinLOD
    Typ: FLOAT

    Lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed.

  • MaxLOD
    Typ: FLOAT

    Upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. This value must be greater than or equal to MinLOD. To have no upper limit on LOD set this to a large value such as D3D11_FLOAT32_MAX.

Hinweise

These are the default values for sampler state.

State Default Value
Filter MIN_MAG_MIP_LINEAR
AddressU Clamp
AddressV Clamp
AddressW Clamp
MinLOD -3.402823466e+38F (-FLT_MAX)
MaxLOD 3.402823466e+38F (FLT_MAX)
MipMapLODBias 0.0f
MaxAnisotropy 16
ComparisonFunc Never
BorderColor float4(0.0f,0.0f,0.0f,0.0f)
Texture N/A

 

Anforderungen

Header

D3D11.h

Siehe auch

Core Structures