GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::graphics::ShaderPipelineOptions Struct Reference

Configuration of a graphics pipeline. More...

#include <GREM/graphics/shaders.hpp>

Public Member Functions

constexpr bool operator== (const ShaderPipelineOptions &other) const noexcept=default
 Compare this configuration to another for equality.

Public Attributes

DepthBufferMode depthBufferMode = DepthBufferMode::USE_DEPTH_TEST
 How to treat the depth buffer for each pixel being rendered.
DepthTestPredicate depthTestPredicate = DepthTestPredicate::LESS_OR_EQUAL
 The condition to check when evaluating the depth test.
StencilBufferMode stencilBufferMode = StencilBufferMode::NONE
 How to treat the stencil buffer for each pixel being rendered.
StencilTestPredicate stencilTestFrontFacePredicate = StencilTestPredicate::ALWAYS_PASS
 The condition to check when evaluating the stencil test for front faces.
int8_t stencilTestFrontFaceReferenceValue = 0
 The reference value to compare the stencil buffer value against when evaluating the stencil test for front faces.
uint8_t stencilTestFrontFaceMask = 0xFF
 The bit pattern to mask the reference value and stencil value with before performing the stencil test for front faces.
StencilBufferOperation stencilBufferOperationOnFrontFaceStencilTestFail = StencilBufferOperation::KEEP
 The operation to perform on the stencil buffer when the stencil test fails for front faces.
StencilBufferOperation stencilBufferOperationOnFrontFaceDepthTestFail = StencilBufferOperation::KEEP
 The operation to perform on the stencil buffer when the stencil test passes, but the depth test fails, for front faces.
StencilBufferOperation stencilBufferOperationOnFrontFacePass = StencilBufferOperation::KEEP
 The operation to perform on the stencil buffer when the stencil test and the depth test both pass for front faces.
StencilTestPredicate stencilTestBackFacePredicate = StencilTestPredicate::ALWAYS_PASS
 The condition to check when evaluating the stencil test for back faces.
int8_t stencilTestBackFaceReferenceValue = 0
 The reference value to compare the stencil buffer value against when evaluating the stencil test for back faces.
uint8_t stencilTestBackFaceMask = 0xFF
 The bit pattern to mask the reference value and stencil value with before performing the stencil test for back faces.
StencilBufferOperation stencilBufferOperationOnBackFaceStencilTestFail = StencilBufferOperation::KEEP
 The operation to perform on the stencil buffer when the stencil test fails for back faces.
StencilBufferOperation stencilBufferOperationOnBackFaceDepthTestFail = StencilBufferOperation::KEEP
 The operation to perform on the stencil buffer when the stencil test passes, but the depth test fails, for back faces.
StencilBufferOperation stencilBufferOperationOnBackFacePass = StencilBufferOperation::KEEP
 The operation to perform on the stencil buffer when the stencil test and the depth test both pass for back faces.
PrimitiveType primitiveType = PrimitiveType::TRIANGLES
 How to form primitives out of consecutive mesh vertices.
PolygonMode polygonMode = PolygonMode::FILL
 How to render polygons.
FaceCullingMode faceCullingMode = FaceCullingMode::CULL_BACK_FACES
 How to treat the facing of primitives while rendering.
FrontFace frontFace = FrontFace::COUNTERCLOCKWISE
 The winding order of front-facing faces.
Optional< BlendState > blendState {}
 How to blend the pixel color with the output while rendering.
float depthBiasSlopeFactor = 0.0f
 Slope-scaled depth bias factor.
float depthBiasConstantFactor = 0.0f
 Constant depth bias factor.

Detailed Description

Configuration of a graphics pipeline.

Member Function Documentation

◆ operator==()

bool grem::graphics::ShaderPipelineOptions::operator== ( const ShaderPipelineOptions & other) const
nodiscardconstexprdefaultnoexcept

Compare this configuration to another for equality.

Parameters
otherthe configuration to compare this one to.
Returns
true if the configurations are equal, false otherwise.

Member Data Documentation

◆ depthBufferMode

DepthBufferMode grem::graphics::ShaderPipelineOptions::depthBufferMode = DepthBufferMode::USE_DEPTH_TEST

How to treat the depth buffer for each pixel being rendered.

See also
depthTestPredicate

◆ depthTestPredicate

DepthTestPredicate grem::graphics::ShaderPipelineOptions::depthTestPredicate = DepthTestPredicate::LESS_OR_EQUAL

The condition to check when evaluating the depth test.

See also
depthBufferMode

◆ stencilBufferMode

◆ stencilTestFrontFacePredicate

◆ stencilTestFrontFaceReferenceValue

int8_t grem::graphics::ShaderPipelineOptions::stencilTestFrontFaceReferenceValue = 0

◆ stencilTestFrontFaceMask

uint8_t grem::graphics::ShaderPipelineOptions::stencilTestFrontFaceMask = 0xFF

The bit pattern to mask the reference value and stencil value with before performing the stencil test for front faces.

The set bits in the mask indicate the relevant bits that will be compared.

See also
stencilBufferMode
stencilTestFrontFacePredicate
stencilTestFrontFaceReferenceValue
stencilBufferOperationOnFrontFaceStencilTestFail
stencilBufferOperationOnFrontFaceDepthTestFail
stencilBufferOperationOnFrontFacePass

◆ stencilBufferOperationOnFrontFaceStencilTestFail

StencilBufferOperation grem::graphics::ShaderPipelineOptions::stencilBufferOperationOnFrontFaceStencilTestFail = StencilBufferOperation::KEEP

◆ stencilBufferOperationOnFrontFaceDepthTestFail

StencilBufferOperation grem::graphics::ShaderPipelineOptions::stencilBufferOperationOnFrontFaceDepthTestFail = StencilBufferOperation::KEEP

The operation to perform on the stencil buffer when the stencil test passes, but the depth test fails, for front faces.

See also
stencilBufferMode
stencilTestFrontFacePredicate
stencilTestFrontFaceReferenceValue
stencilTestFrontFaceMask
stencilBufferOperationOnFrontFaceStencilTestFail
stencilBufferOperationOnFrontFacePass

◆ stencilBufferOperationOnFrontFacePass

StencilBufferOperation grem::graphics::ShaderPipelineOptions::stencilBufferOperationOnFrontFacePass = StencilBufferOperation::KEEP

◆ stencilTestBackFacePredicate

◆ stencilTestBackFaceReferenceValue

int8_t grem::graphics::ShaderPipelineOptions::stencilTestBackFaceReferenceValue = 0

◆ stencilTestBackFaceMask

uint8_t grem::graphics::ShaderPipelineOptions::stencilTestBackFaceMask = 0xFF

The bit pattern to mask the reference value and stencil value with before performing the stencil test for back faces.

The set bits in the mask indicate the relevant bits that will be compared.

See also
stencilBufferMode
stencilTestFrontFacePredicate
stencilTestFrontFaceReferenceValue
stencilBufferOperationOnFrontFaceStencilTestFail
stencilBufferOperationOnFrontFaceDepthTestFail
stencilBufferOperationOnFrontFacePass

◆ stencilBufferOperationOnBackFaceStencilTestFail

StencilBufferOperation grem::graphics::ShaderPipelineOptions::stencilBufferOperationOnBackFaceStencilTestFail = StencilBufferOperation::KEEP

◆ stencilBufferOperationOnBackFaceDepthTestFail

StencilBufferOperation grem::graphics::ShaderPipelineOptions::stencilBufferOperationOnBackFaceDepthTestFail = StencilBufferOperation::KEEP

The operation to perform on the stencil buffer when the stencil test passes, but the depth test fails, for back faces.

See also
stencilBufferMode
stencilTestFrontFacePredicate
stencilTestFrontFaceReferenceValue
stencilTestFrontFaceMask
stencilBufferOperationOnFrontFaceStencilTestFail
stencilBufferOperationOnFrontFacePass

◆ stencilBufferOperationOnBackFacePass

StencilBufferOperation grem::graphics::ShaderPipelineOptions::stencilBufferOperationOnBackFacePass = StencilBufferOperation::KEEP

◆ primitiveType

PrimitiveType grem::graphics::ShaderPipelineOptions::primitiveType = PrimitiveType::TRIANGLES

How to form primitives out of consecutive mesh vertices.

◆ polygonMode

PolygonMode grem::graphics::ShaderPipelineOptions::polygonMode = PolygonMode::FILL

How to render polygons.

◆ faceCullingMode

FaceCullingMode grem::graphics::ShaderPipelineOptions::faceCullingMode = FaceCullingMode::CULL_BACK_FACES

How to treat the facing of primitives while rendering.

The facing is determined by the winding order of the vertices on each rendered face. The face is considered to be front-facing if it has the winding order specified by frontFace.

See also
frontFace

◆ frontFace

FrontFace grem::graphics::ShaderPipelineOptions::frontFace = FrontFace::COUNTERCLOCKWISE

The winding order of front-facing faces.

See also
faceCullingMode

◆ blendState

Optional<BlendState> grem::graphics::ShaderPipelineOptions::blendState {}

How to blend the pixel color with the output while rendering.

◆ depthBiasSlopeFactor

float grem::graphics::ShaderPipelineOptions::depthBiasSlopeFactor = 0.0f

Slope-scaled depth bias factor.

See also
depthBiasConstantFactor

◆ depthBiasConstantFactor

float grem::graphics::ShaderPipelineOptions::depthBiasConstantFactor = 0.0f

Constant depth bias factor.

See also
depthBiasSlopeFactor

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