CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::GPUSamplerDescriptor Struct Referencefinal

Image sampler descriptor structure. More...

#include <CeresEngine/RenderAPI/GPUSampler.hpp>

Static Public Member Functions

template<typename Processor >
static constexpr void reflect (Processor &&RTTI)
 Executes the given processor for every field of the struct.
 

Public Attributes

GPUSamplerAddressMode addressModeU = GPUSamplerAddressMode::Repeat
 Sampler address mode in U direction (also X axis).
 
GPUSamplerAddressMode addressModeV = GPUSamplerAddressMode::Repeat
 Sampler address mode in V direction (also Y axis).
 
GPUSamplerAddressMode addressModeW = GPUSamplerAddressMode::Repeat
 Sampler address mode in W direction (also Z axis).
 
GPUSamplerFilter minFilter = GPUSamplerFilter::Nearest
 Minification filter. By default SamplerFilter::Nearest.
 
GPUSamplerFilter magFilter = GPUSamplerFilter::Nearest
 Magnification filter. By default SamplerFilter::Nearest.
 
GPUSamplerFilter mipMapFilter = GPUSamplerFilter::Nearest
 MIP-mapping filter. By default SamplerFilter::Nearest.
 
bool mipMapping = false
 Specifies whether MIP-maps are used or not. By default false.
 
float mipMapLODBias = 0.0f
 MIP-mapping level-of-detail (LOD) bias (or rather offset).
 
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.
 
UInt32 maxAnisotropy = 1
 Maximal anisotropy in the range [1, 16].
 
bool compareEnabled = false
 Specifies whether the compare operation for depth images is to be used or not.
 
GPUCompareOp compareOp = GPUCompareOp::Less
 Compare operation for depth images. By default CompareOp::Less.
 
Vector4f borderColor = {0.0f, 0.0f, 0.0f, 0.0f}
 Border color. By default black (0, 0, 0, 0).
 
String name
 A user-facing name for the sampler.
 

Friends

bool operator== (const GPUSamplerDescriptor &lhs, const GPUSamplerDescriptor &rhs)
 Compares two SamplerDescriptor instances for equality.
 
bool operator!= (const GPUSamplerDescriptor &lhs, const GPUSamplerDescriptor &rhs)
 Compares two SamplerDescriptor instances for inequality.
 
String toString (const GPUSamplerDescriptor &descriptor)
 Creates a string representation of the SamplerDescriptor.
 
std::ostream & operator<< (std::ostream &os, const GPUSamplerDescriptor &descriptor)
 Creates a string representation of the SamplerDescriptor.
 

Detailed Description

Image sampler descriptor structure.

Member Function Documentation

◆ reflect()

template<typename Processor >
static constexpr void CeresEngine::GPUSamplerDescriptor::reflect ( Processor &&  RTTI)
inlinestaticconstexpr

Executes the given processor for every field of the struct.

Parameters
RTTIThe processor to be ran for every field.

Friends And Related Symbol Documentation

◆ operator!=

Compares two SamplerDescriptor instances for inequality.

Parameters
lhsThe left hand side operand
rhsThe right hand side operand
Returns
true if both descriptors are not equal

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const GPUSamplerDescriptor descriptor 
)
friend

Creates a string representation of the SamplerDescriptor.

Parameters
osOs stream to output it to
descriptorThe descriptor to be converted
Returns
The given os

◆ operator==

Compares two SamplerDescriptor instances for equality.

Parameters
lhsThe left hand side operand
rhsThe right hand side operand
Returns
true if both descriptors are equal

◆ toString

String toString ( const GPUSamplerDescriptor descriptor)
friend

Creates a string representation of the SamplerDescriptor.

Parameters
descriptorThe descriptor to be converted
Returns
A string representation of the SamplerDescriptor.

Member Data Documentation

◆ addressModeU

GPUSamplerAddressMode CeresEngine::GPUSamplerDescriptor::addressModeU = GPUSamplerAddressMode::Repeat

Sampler address mode in U direction (also X axis).

By default SamplerAddressMode::Repeat.

◆ addressModeV

GPUSamplerAddressMode CeresEngine::GPUSamplerDescriptor::addressModeV = GPUSamplerAddressMode::Repeat

Sampler address mode in V direction (also Y axis).

By default SamplerAddressMode::Repeat.

◆ addressModeW

GPUSamplerAddressMode CeresEngine::GPUSamplerDescriptor::addressModeW = GPUSamplerAddressMode::Repeat

Sampler address mode in W direction (also Z axis).

By default SamplerAddressMode::Repeat.

◆ borderColor

Vector4f CeresEngine::GPUSamplerDescriptor::borderColor = {0.0f, 0.0f, 0.0f, 0.0f}

Border color. By default black (0, 0, 0, 0).

◆ compareEnabled

bool CeresEngine::GPUSamplerDescriptor::compareEnabled = false

Specifies whether the compare operation for depth images is to be used or not.

By default false.

◆ compareOp

GPUCompareOp CeresEngine::GPUSamplerDescriptor::compareOp = GPUCompareOp::Less

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

◆ magFilter

GPUSamplerFilter CeresEngine::GPUSamplerDescriptor::magFilter = GPUSamplerFilter::Nearest

Magnification filter. By default SamplerFilter::Nearest.

◆ maxAnisotropy

UInt32 CeresEngine::GPUSamplerDescriptor::maxAnisotropy = 1

Maximal anisotropy in the range [1, 16].

◆ maxLOD

float CeresEngine::GPUSamplerDescriptor::maxLOD = 1000.0f

Upper end of the MIP-map range.

Must be greater than or equal to minLOD. By default 1000.

◆ minFilter

GPUSamplerFilter CeresEngine::GPUSamplerDescriptor::minFilter = GPUSamplerFilter::Nearest

Minification filter. By default SamplerFilter::Nearest.

◆ minLOD

float CeresEngine::GPUSamplerDescriptor::minLOD = 0.0f

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

◆ mipMapFilter

GPUSamplerFilter CeresEngine::GPUSamplerDescriptor::mipMapFilter = GPUSamplerFilter::Nearest

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

◆ mipMapLODBias

float CeresEngine::GPUSamplerDescriptor::mipMapLODBias = 0.0f

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

By default 0.

◆ mipMapping

bool CeresEngine::GPUSamplerDescriptor::mipMapping = false

Specifies whether MIP-maps are used or not. By default false.

◆ name

String CeresEngine::GPUSamplerDescriptor::name

A user-facing name for the sampler.

This is only used for debugging.


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