SamplerDesc struct
Sampler description.
Contents
- Reference
This structure describes the sampler state which is used in a call to IRenderDevice::
To create an anisotropic filter, all three filters must either be Diligent::
MipFilter cannot be comparison filter except for Diligent::
Both MinFilter and MagFilter must either be regular filters or comparison filters. Mixing comparison and regular filters is an error.
Base classes
- struct DeviceObjectAttribs
- Describes common device object attributes.
Public functions
- auto operator==(const SamplerDesc& RHS) const -> bool
- Tests if two structures are equivalent.
Public variables
-
FILTER_
TYPE MinFilter - Texture minification filter, see Diligent::
FILTER_TYPE for details. Default value: Diligent:: FILTER_TYPE_LINEAR. -
FILTER_
TYPE MagFilter - Texture magnification filter, see Diligent::
FILTER_TYPE for details. Default value: Diligent:: FILTER_TYPE_LINEAR. -
FILTER_
TYPE MipFilter - Mip filter, see Diligent::
FILTER_TYPE for details. Only FILTER_TYPE_POINT, FILTER_TYPE_LINEAR, FILTER_TYPE_ANISOTROPIC, and FILTER_TYPE_COMPARISON_ANISOTROPIC are allowed. Default value: Diligent:: FILTER_TYPE_LINEAR. -
TEXTURE_
ADDRESS_ MODE AddressU - Texture address mode for U coordinate, see Diligent::
TEXTURE_ADDRESS_MODE for details Default value: Diligent:: TEXTURE_ADDRESS_CLAMP. -
TEXTURE_
ADDRESS_ MODE AddressV - Texture address mode for V coordinate, see Diligent::
TEXTURE_ADDRESS_MODE for details Default value: Diligent:: TEXTURE_ADDRESS_CLAMP. -
TEXTURE_
ADDRESS_ MODE AddressW - Texture address mode for W coordinate, see Diligent::
TEXTURE_ADDRESS_MODE for details Default value: Diligent:: TEXTURE_ADDRESS_CLAMP. - Float32 MipLODBias
- Offset from the calculated mipmap level. For example, if a sampler calculates that a texture should be sampled at mipmap level 1.2 and MipLODBias is 2.3, then the texture will be sampled at mipmap level 3.5. Default value: 0.
- Uint32 MaxAnisotropy
- Maximum anisotropy level for the anisotropic filter. Default value: 0.
-
COMPARISON_
FUNCTION ComparisonFunc - A function that compares sampled data against existing sampled data when comparsion filter is used. Default value: Diligent::
COMPARISON_FUNC_NEVER. - Float32 BorderColor
- Border color to use if TEXTURE_ADDRESS_BORDER is specified for AddressU, AddressV, or AddressW. Default value: {0,0,0,0}.
- float MinLOD
- Specifies the minimum value that LOD is clamped to before accessing the texture MIP levels. Must be less than or equal to MaxLOD. Default value: 0.
- float MaxLOD
- Specifies the maximum value that LOD is clamped to before accessing the texture MIP levels. Must be greater than or equal to MinLOD. Default value: +FLT_MAX.
Function documentation
bool Diligent:: SamplerDesc:: operator==(const SamplerDesc& RHS) const
Tests if two structures are equivalent.
| Parameters | |
|---|---|
| RHS in | - reference to the structure to perform comparison with |
| Returns |
|