59 ComparisonFunction_Size,
107 struct hash<
Cogs::SamplerState>
111 static std::hash<size_t> hashFunction;
113 size_t result = hashFunction(
static_cast<size_t>(state.
addressModeS));
114 result = result * 16777619 + hashFunction(
static_cast<size_t>(state.
addressModeT));
115 result = result * 16777619 + hashFunction(
static_cast<size_t>(state.
addressModeW));
116 result = result * 16777619 + hashFunction(
static_cast<size_t>(state.
filter));
117 result = result * 16777619 + hashFunction(
static_cast<size_t>(state.
comparisonFunction));
118 result = result * 16777619 + hashFunction(
static_cast<size_t>(state.
maxAnisotropy));
128 struct equal_to<
Cogs::SamplerState>
Contains all Cogs related functionality.
Encapsulates state for texture sampling in a state object.
ComparisonFunction comparisonFunction
Specifies the comparison function to use when applying a comparison sampler.
unsigned int maxAnisotropy
Specifies the maximum number of anisotropic samples to use when sampling a texture.
static SamplerState & DefaultState()
Constructs a sampler state initialized with the default values.
AddressMode addressModeW
Specifies the addressing mode along the W axis in texture coordinate space.
ComparisonFunction
Comparison functions applied when sampling depth buffers using comparison filters.
AddressMode addressModeS
Specifies the addressing mode along the S axis in texture coordinate space.
AddressMode
Addressing modes to use when sampling textures.
@ Clamp
Texture coordinates are clamped to the [0, 1] range.
@ Border
Texture color is set to the border color when outside [0, 1] range.
@ Wrap
Texture coordinates automatically wrap around to [0, 1] range.
@ Mirror
Texture coordinates are mirrored when outside [0, 1] range.
FilterMode
Filter modes to specify how texture data is treated when sampled.
@ ComparisonMinMagMipPoint
Comparison filter for depth sample comparisons using point sampling.
@ ComparisonMinMagMipLinear
Comparison filter for depth sample comparisons using linear interpolation sampling.
@ MinMagMipPoint
Point sampling for both minification and magnification.
@ MinMagMipLinear
Linear sampling for both minification and magnification.
FilterMode filter
Specifies the filter to use for texture sampling.
AddressMode addressModeT
Specifies the addressing mode along the T axis in texture coordinate space.