![]() |
Lysa
0.0
Lysa 3D Engine
|
Manages a small, shared collection of GPU sampler objects.
Notes:
Classes | |
| struct | SamplerInfo |
Public Member Functions | |
| uint32 | addSampler (vireo::Filter minFilter, vireo::Filter maxFilter, vireo::AddressMode samplerAddressModeU, vireo::AddressMode samplerAddressModeV, float minLod=0.0f, float maxLod=vireo::Sampler::LOD_CLAMP_NONE, bool anisotropyEnable=true, vireo::MipMapMode mipMapMode=vireo::MipMapMode::LINEAR, vireo::CompareOp compareOp=vireo::CompareOp::NEVER) |
| bool | isUpdated () const |
| void | update () |
| const auto & | getDescriptorLayout () const |
| const auto & | getDescriptorSet () const |
Static Public Attributes | |
| static constexpr auto | MAX_SAMPLERS {20} |
| static constexpr uint32 | SET_SAMPLERS {1} |
| uint32 addSampler | ( | vireo::Filter | minFilter, |
| vireo::Filter | maxFilter, | ||
| vireo::AddressMode | samplerAddressModeU, | ||
| vireo::AddressMode | samplerAddressModeV, | ||
| float | minLod = 0.0f, |
||
| float | maxLod = vireo::Sampler::LOD_CLAMP_NONE, |
||
| bool | anisotropyEnable = true, |
||
| vireo::MipMapMode | mipMapMode = vireo::MipMapMode::LINEAR, |
||
| vireo::CompareOp | compareOp = vireo::CompareOp::NEVER |
||
| ) |
Adds a sampler to the pool, creating it if an equivalent one does not already exist, and returns its index for binding.
| minFilter | Minification filter. |
| maxFilter | Magnification filter. |
| samplerAddressModeU | Address mode for U (S) coordinate. |
| samplerAddressModeV | Address mode for V (T) coordinate. |
| minLod | Minimum LOD to sample (default 0.0f). |
| maxLod | Maximum LOD to sample; use Sampler::LOD_CLAMP_NONE to disable clamping. |
| anisotropyEnable | Enable anisotropic filtering when available. |
| mipMapMode | Mip sampling mode (default LINEAR). |
| compareOp | Optional compare op for depth/shadow lookups. |
|
inline |
Returns the descriptor layout used for the samplers set.
|
inline |
Returns the descriptor set that binds the samplers to shaders.
|
inline |
Returns true if the samplers descriptor set needs to be updated.
| void update | ( | ) |
Writes pending sampler bindings to the descriptor set if needed.
|
friend |
|
staticconstexpr |
Maximum number of sampler objects managed by this pool.
|
staticconstexpr |
Descriptor set index used by pipelines to bind the samplers set.