1 #ifndef DONUT_GRAPHICS_SHADER_CONFIGURATION_HPP
2 #define DONUT_GRAPHICS_SHADER_CONFIGURATION_HPP
DepthBufferMode
Depth buffer mode used in a ShaderConfiguration.
Definition: ShaderConfiguration.hpp:14
@ USE_DEPTH_TEST
Evaluate the depth test defined by the DepthTestPredicate to determine whether the pixel should be re...
@ IGNORE
Ignore the depth buffer.
FaceCullingMode
Face culling mode used in a ShaderConfiguration.
Definition: ShaderConfiguration.hpp:237
@ CULL_FRONT_AND_BACK_FACES
Discard all faces, only render primitives without faces, such as lines and points.
@ CULL_BACK_FACES
Discard back-facing faces.
@ CULL_FRONT_FACES
Discard front-facing faces.
DepthTestPredicate
Depth test predicate used in a ShaderConfiguration.
Definition: ShaderConfiguration.hpp:40
@ ALWAYS_PASS
The depth test always passes.
@ LESS
The depth test passes if and only if the new depth value is less than the old depth value.
@ NOT_EQUAL
The depth test passes if and only if the new depth value is not equal to the old depth value.
@ NEVER_PASS
The depth test always fails.
@ LESS_OR_EQUAL
The depth test passes if and only if the new depth value is less than or equal to the old depth value...
@ EQUAL
The depth test passes if and only if the new depth value is equal to the old depth value.
@ GREATER_OR_EQUAL
The depth test passes if and only if the new depth value is greater than or equal to the old depth va...
@ GREATER
The depth test passes if and only if the new depth value is greater than the old depth value.
StencilBufferMode
Stencil buffer mode used in a ShaderConfiguration.
Definition: ShaderConfiguration.hpp:93
@ IGNORE
Ignore the stencil buffer.
@ USE_STENCIL_TEST
Evaluate the stencil test defined by the StencilTestPredicate to determine whether the pixel should b...
StencilTestPredicate
Stencil test predicate used in a ShaderConfiguration.
Definition: ShaderConfiguration.hpp:114
@ ALWAYS_PASS
The stencil test always passes.
@ LESS
The stencil test passes if and only if the given reference value is less than the current value in th...
@ NOT_EQUAL
The stencil test passes if and only if the given reference value is not equal to the current value in...
@ NEVER_PASS
The stencil test always fails.
@ LESS_OR_EQUAL
The stencil test passes if and only if the given reference value is less than or equal to the current...
@ EQUAL
The stencil test passes if and only if the given reference value is equal to the current value in the...
@ GREATER_OR_EQUAL
The stencil test passes if and only if the given reference value is greater than or equal to the curr...
@ GREATER
The stencil test passes if and only if the given reference value is greater than the current value in...
AlphaMode
Alpha mode used in a ShaderConfiguration.
Definition: ShaderConfiguration.hpp:282
@ USE_ALPHA_BLENDING
Blend the old and new pixel colors depending on the alpha value of the new pixel according to the sta...
@ IGNORE
Ignore the alpha channel value of the rendered pixel color.
StencilBufferOperation
Operation to perform after evaluating the stencil test in a ShaderConfiguration.
Definition: ShaderConfiguration.hpp:188
@ INCREMENT_CLAMP
Increment the stencil buffer value by 1, unless it is already maxed out.
@ REPLACE
Set the stencil buffer value to the given reference value.
@ SET_TO_ZERO
Set the stencil buffer value to 0.
@ BITWISE_INVERT
Toggle each bit in the stencil buffer value.
@ KEEP
Keep the current value in the stencil buffer.
@ DECREMENT_WRAP
Decrement the stencil buffer value by 1, or wrap around to the maximum value if it was 0.
@ DECREMENT_CLAMP
Decrement the stencil buffer value by 1, unless it is already 0.
@ INCREMENT_WRAP
Increment the stencil buffer value by 1, or wrap around to 0 if it was maxed out.
FrontFace
Front face used in a ShaderConfiguration.
Definition: ShaderConfiguration.hpp:265
@ COUNTERCLOCKWISE
Consider faces with counterclockwise winding order as front-facing.
@ CLOCKWISE
Consider faces with clockwise winding order as front-facing.
Base configuration options for a shader.
Definition: ShaderConfiguration.hpp:299
DepthTestPredicate depthTestPredicate
The condition to check when evaluating the depth test.
Definition: ShaderConfiguration.hpp:312
constexpr std::strong_ordering operator<=>(const ShaderConfiguration &other) const =default
Compare two sets of shader options.
StencilTestPredicate stencilTestPredicate
The condition to check when evaluating the stencil test.
Definition: ShaderConfiguration.hpp:336
std::uint32_t stencilTestMask
The bit pattern to mask the reference value and stencil value with before performing the stencil test...
Definition: ShaderConfiguration.hpp:365
StencilBufferOperation stencilBufferOperationOnStencilTestFail
The operation to perform on the stencil buffer if the stencil test fails.
Definition: ShaderConfiguration.hpp:377
AlphaMode alphaMode
How to treat the alpha channel of the output pixel color while rendering.
Definition: ShaderConfiguration.hpp:426
StencilBufferOperation stencilBufferOperationOnPass
The operation to perform on the stencil buffer if the stencil test and the depth test both pass.
Definition: ShaderConfiguration.hpp:403
FrontFace frontFace
The winding order of front-facing faces.
Definition: ShaderConfiguration.hpp:421
StencilBufferMode stencilBufferMode
How to treat the stencil buffer for each pixel being rendered.
Definition: ShaderConfiguration.hpp:324
StencilBufferOperation stencilBufferOperationOnDepthTestFail
The operation to perform on the stencil buffer if the stencil test passes, but the depth test fails.
Definition: ShaderConfiguration.hpp:390
constexpr bool operator==(const ShaderConfiguration &other) const =default
Compare two sets of shader options for equality.
DepthBufferMode depthBufferMode
How to treat the depth buffer for each pixel being rendered.
Definition: ShaderConfiguration.hpp:305
FaceCullingMode faceCullingMode
How to treat the facing of primitives while rendering.
Definition: ShaderConfiguration.hpp:414
std::int32_t stencilTestReferenceValue
The reference value to compare the stencil buffer value against when evaluating the stencil test.
Definition: ShaderConfiguration.hpp:349