XII Release 0.1.0
Loading...
Searching...
No Matches
xiiGALSamplerCreationDescription Struct Reference

This describes the sampler creation description. More...

#include <Sampler.h>

Inheritance diagram for xiiGALSamplerCreationDescription:
[legend]

Public Member Functions

 XII_DECLARE_POD_TYPE ()
 
- Public Member Functions inherited from xiiHashableStruct< xiiGALSamplerCreationDescription >
 xiiHashableStruct (const xiiHashableStruct< xiiGALSamplerCreationDescription > &other)
 
void operator= (const xiiHashableStruct< xiiGALSamplerCreationDescription > &other)
 
XII_ALWAYS_INLINE constexpr bool operator== (const xiiHashableStruct< xiiGALSamplerCreationDescription > &rhs) const=default
 
xiiUInt32 CalculateHash () const
 Calculates the 32 bit hash of the struct and returns it.
 

Public Attributes

xiiEnum< xiiGALFilterTypem_MinFilter = xiiGALFilterType::Linear
 Texture minification filter. The default is Linear.
 
xiiEnum< xiiGALFilterTypem_MagFilter = xiiGALFilterType::Linear
 Texture magnification filter. The default is Linear.
 
xiiEnum< xiiGALFilterTypem_MipFilter = xiiGALFilterType::Linear
 Texture mip filter. The default is Linear.
 
xiiEnum< xiiGALTextureAddressModem_AddressU = xiiGALTextureAddressMode::Clamp
 Texture address mode for U coordinate. The default is Clamp.
 
xiiEnum< xiiGALTextureAddressModem_AddressV = xiiGALTextureAddressMode::Clamp
 Texture address mode for V coordinate. The default is Clamp.
 
xiiEnum< xiiGALTextureAddressModem_AddressW = xiiGALTextureAddressMode::Clamp
 Texture address mode for W coordinate. The default is Clamp.
 
xiiBitflags< xiiGALSamplerFlagsm_Flags = xiiGALSamplerFlags::None
 Sampler flags.
 
bool m_bUnormalizedCoords = false
 
float m_fMipLODBias = 0.0f
 Offset from the calculated mipmap level. The default is 0;.
 
xiiUInt32 m_uiMaxAnisotropy = 0U
 Maximum anisotropy level for the anisotropic filter. The default is 0.
 
xiiEnum< xiiGALComparisonFunctionm_ComparisonFunction = xiiGALComparisonFunction::Never
 A function that compares sampled data against existing sampled data when comparisons filter used. The default is Never.
 
xiiColor m_BorderColor = xiiColor::Black
 Border color to use if the texture address border is specified for AddressU, AddressV, or AddressW. The default is xiiColor::Black.
 
float m_fMinLOD = 0.0f
 Specifies the minimum value that LOD is clamped to before accessing the texture MIP levels. The default is 0.
 
float m_fMaxLOD = xiiMath::MaxValue<float>()
 Specifies the maximum value that LOD is clamped to before accessing the texture MIP levels. The default is xiiMath::MaxValue<float>().
 

Detailed Description

This describes the sampler creation description.

To create an anisotropic filter, all three filters must either be xiiGALFilterType::Anisotropic or xiiGALFilterType::ComparisonAnisotropic.

The MipFilter member cannot be comparison filter except for xiiGALFilterType::Anisotropic if all three filters have that value.

The MinFilter and MagFilter members must either be regular filters or comparison filters, as mixing comparison filters and regular filters is an error.

Member Data Documentation

◆ m_bUnormalizedCoords

bool xiiGALSamplerCreationDescription::m_bUnormalizedCoords = false

Indicates whether to use unnormalized texture coordinates.

Remarks
When set to true, the range of the image coordinates used to lookup the texel is in the range of 0 to the image size in each dimension. When set to False, the range of image coordinates is 0.0 to 1.0.

Unnormalized coordinates are only supported in Vulkan and Metal.


The documentation for this struct was generated from the following file: