LLGL 0.05 Beta
Loading...
Searching...
No Matches
LLGL::SamplerDescriptor Struct Reference

Texture sampler descriptor structure. More...

#include <SamplerFlags.h>

Public Attributes

const char * debugName = nullptr
 Optional name for debugging purposes. By default null.
SamplerAddressMode addressModeU = SamplerAddressMode::Repeat
 Sampler address mode in U direction (also X axis). By default SamplerAddressMode::Repeat.
SamplerAddressMode addressModeV = SamplerAddressMode::Repeat
 Sampler address mode in V direction (also Y axis). By default SamplerAddressMode::Repeat.
SamplerAddressMode addressModeW = SamplerAddressMode::Repeat
 Sampler address mode in W direction (also Z axis). By default SamplerAddressMode::Repeat.
SamplerFilter minFilter = SamplerFilter::Linear
 Minification filter. By default SamplerFilter::Linear.
SamplerFilter magFilter = SamplerFilter::Linear
 Magnification filter. By default SamplerFilter::Linear.
SamplerFilter mipMapFilter = SamplerFilter::Linear
 MIP-mapping filter. By default SamplerFilter::Linear.
bool mipMapEnabled = true
 Specifies whether MIP-mapping is enabled or disabled. By default true.
float mipMapLODBias = 0.0f
 MIP-mapping level-of-detail (LOD) bias (or rather offset). By default 0.
float minLOD = 0.0f
 Lower end of the MIP-map range. By default 0.
float maxLOD = 1000.0f
 Upper end of the MIP-map range. Must be greater than or equal to minLOD. By default 1000.
std::uint32_t maxAnisotropy = 1
 Maximal anisotropy in the range [1, 16].
bool compareEnabled = false
 Specifies whether the compare operation for depth textures is to be used or not. By default false.
CompareOp compareOp = CompareOp::Less
 Compare operation for depth textures. By default CompareOp::Less.
float borderColor [4] = { 0.0f, 0.0f, 0.0f, 0.0f }
 Border color vector with four components: red, green, blue, and alpha. By default transparent-black (0, 0, 0, 0).

Detailed Description

Texture sampler descriptor structure.

See also
RenderSystem::CreateSampler

Member Data Documentation

◆ addressModeU

SamplerAddressMode LLGL::SamplerDescriptor::addressModeU = SamplerAddressMode::Repeat

Sampler address mode in U direction (also X axis). By default SamplerAddressMode::Repeat.

◆ addressModeV

SamplerAddressMode LLGL::SamplerDescriptor::addressModeV = SamplerAddressMode::Repeat

Sampler address mode in V direction (also Y axis). By default SamplerAddressMode::Repeat.

◆ addressModeW

SamplerAddressMode LLGL::SamplerDescriptor::addressModeW = SamplerAddressMode::Repeat

Sampler address mode in W direction (also Z axis). By default SamplerAddressMode::Repeat.

◆ borderColor

float LLGL::SamplerDescriptor::borderColor[4] = { 0.0f, 0.0f, 0.0f, 0.0f }

Border color vector with four components: red, green, blue, and alpha. By default transparent-black (0, 0, 0, 0).

Note
For Vulkan and Metal as well as static samplers in general, only three predefined border colors are supported:
  • Transparent black: {0,0,0,0}
  • Opaque black: {0,0,0,1}
  • Opaque white: {1,1,1,1}

◆ compareEnabled

bool LLGL::SamplerDescriptor::compareEnabled = false

Specifies whether the compare operation for depth textures is to be used or not. By default false.

◆ compareOp

CompareOp LLGL::SamplerDescriptor::compareOp = CompareOp::Less

Compare operation for depth textures. By default CompareOp::Less.

◆ debugName

const char* LLGL::SamplerDescriptor::debugName = nullptr

Optional name for debugging purposes. By default null.

Remarks
The final name of the native hardware resource is implementation defined.
See also
RenderSystemChild::SetDebugName

◆ magFilter

SamplerFilter LLGL::SamplerDescriptor::magFilter = SamplerFilter::Linear

Magnification filter. By default SamplerFilter::Linear.

◆ maxAnisotropy

std::uint32_t LLGL::SamplerDescriptor::maxAnisotropy = 1

Maximal anisotropy in the range [1, 16].

Note
Only supported with: OpenGL (Desktop only), Vulkan, Direct3D 11, Direct3D 12, Metal.

◆ maxLOD

float LLGL::SamplerDescriptor::maxLOD = 1000.0f

Upper end of the MIP-map range. Must be greater than or equal to minLOD. By default 1000.

◆ minFilter

SamplerFilter LLGL::SamplerDescriptor::minFilter = SamplerFilter::Linear

Minification filter. By default SamplerFilter::Linear.

◆ minLOD

float LLGL::SamplerDescriptor::minLOD = 0.0f

Lower end of the MIP-map range. By default 0.

◆ mipMapEnabled

bool LLGL::SamplerDescriptor::mipMapEnabled = true

Specifies whether MIP-mapping is enabled or disabled. By default true.

Remarks
If MIP-mapping is disabled, mipMapFilter is ignored.
The number of MIP-maps a texture has is specified by the TextureDescriptor::mipLevels attribute.
See also
TextureDescriptor::mipLevels

◆ mipMapFilter

SamplerFilter LLGL::SamplerDescriptor::mipMapFilter = SamplerFilter::Linear

MIP-mapping filter. By default SamplerFilter::Linear.

◆ mipMapLODBias

float LLGL::SamplerDescriptor::mipMapLODBias = 0.0f

MIP-mapping level-of-detail (LOD) bias (or rather offset). By default 0.

Remarks
For Metal and OpenGLES, the LOD bias can only be specified within the shader code.
Note
Only supported with: OpenGL (Desktop only), Vulkan, Direct3D 11, Direct3D 12.

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