D3D12XBOX_SAMPLER_DESC Structure

Describes a sampler state.

Syntax

typedef struct D3D12XBOX_SAMPLER_DESC {
    D3D12XBOX_SAMPLER_FLAGS Flags;
    D3D12XBOX_TEXTURE_XY_FILTER FilterMag;
    D3D12XBOX_TEXTURE_XY_FILTER FilterMin;
    D3D12XBOX_TEXTURE_MIP_FILTER FilterMip;
    D3D12XBOX_TEXTURE_Z_FILTER FilterZ;
    D3D12XBOX_TEXTURE_FILTER_MODE FilterMode;
    D3D12_TEXTURE_ADDRESS_MODE AddressU;
    D3D12_TEXTURE_ADDRESS_MODE AddressV;
    D3D12_TEXTURE_ADDRESS_MODE AddressW;
    FLOAT MinLOD;
    FLOAT MaxLOD;
    FLOAT MipLODBias;
    FLOAT MipLODBiasSecondary;
    UINT MaxAnisotropy;
    FLOAT AnisotropyBias;
    UINT AnisotropyThreshold;
    D3D12_COMPARISON_FUNC ComparisonFunc;
    FLOAT BorderColor[4];
    UINT PerformanceMip;
    UINT PerformanceZ;
} D3D12XBOX_SAMPLER_DESC;  

Members

Flags
A flag from the D3D12XBOX_SAMPLER_FLAGS enumeration.

FilterMag
A value from the D3D12XBOX_TEXTURE_XY_FILTER enumeration specifying the XY filtering to use.

FilterMin
A value from the D3D12XBOX_TEXTURE_XY_FILTER enumeration specifying the XY filtering to use.

FilterMip
A value from the D3D12XBOX_TEXTURE_MIP_FILTER enumeration specifying the MIP filtering to use.

FilterZ
A value from the D3D12XBOX_TEXTURE_Z_FILTER enumeration specifying the Z filter to use.

FilterMode
A value from the D3D12XBOX_TEXTURE_FILTER_MODE enumeration specifying the filtering method to use when sampling a texture.

AddressU
A value from the D3D12_TEXTURE_ADDRESS_MODE enumeration that specifies the method to use for resolving a u texture coordinate that is outside the 0 to 1 range.

AddressV
A value from the D3D12_TEXTURE_ADDRESS_MODE enumeration that specifies the method to use for resolving a v texture coordinate that is outside the 0 to 1 range.

AddressW
A value from the D3D12_TEXTURE_ADDRESS_MODE enumeration that specifies the method to use for resolving a w texture coordinate that is outside the 0 to 1 range.

MinLOD
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
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 member to a large value.

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

MipLODBiasSecondary
The secondary offset from the calculated mipmap level.

MaxAnisotropy
Clamping value used if D3D12_FILTER_ANISOTROPIC or D3D12_FILTER_COMPARISON_ANISOTROPIC is specified in Filter. Valid values are between 1 and 16.

AnisotropyBias
To reduce the computed anisotropy, this u1.5 field is subtracted from the computed aniso ratio. The subtract occurs in log space, so 1.0 would halve the aniso ratio and the number of samples taken. The larger the value, the more quality is sacrificed for performance. Anisobias can be scaled down on a per-resource basis by the resource PERF_MOD field. The final_aniso_degree = 2^(aniso_degree_exp – AnisotropicBias). The maximum reduction with this bias is almost 4.

AnisotropyThreshold
Adjusts performance-versus-quality tradeoffs in the texture sampling hardware, regarding anisotropic filtering. Increased values lead to higher performance and lower sampling quality.

ComparisonFunc
A D3D12_COMPARISON_FUNC-typed value that specifies a function that compares sampled data against existing sampled data.

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

PerformanceMip
Adjusts performance-versus-quality tradeoffs in the texture sampling hardware, regarding mip filtering. Increased values lead to higher performance and lower sampling quality.

PerformanceZ
Adjusts performance-versus-quality tradeoffs in the texture sampling hardware, regarding depth filtering. Increased values lead to higher performance and lower sampling quality.

Requirements

Header: Declared in d3d12_x.h.