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

Blending state descriptor structure. More...

#include <CeresEngine/RenderAPI/GPUGraphicsPipeline.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

bool alphaToCoverageEnabled = false
 Specifies whether to use alpha-to-coverage as a multi-sampling technique when setting a pixel to a render target.
 
bool independentBlendEnabled = false
 Specifies whether to enable independent blending in simultaneous color attachments.
 
GPULogicOp logicOp = GPULogicOp::Disabled
 Specifies the logic fragment operation.
 
Vector4f blendFactor = {0.0f, 0.0f, 0.0f, 0.0f}
 Specifies the blending color factor.
 
Array< GPUBlendTargetDescriptor, 8 > targets
 Render-target blend states for the respective color attachments.
 

Detailed Description

Blending state descriptor structure.

Member Function Documentation

◆ reflect()

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

Executes the given processor for every field of the struct.

Parameters
RTTIThe processor to be ran for every field.

Member Data Documentation

◆ alphaToCoverageEnabled

bool CeresEngine::GPUBlendDescriptor::alphaToCoverageEnabled = false

Specifies whether to use alpha-to-coverage as a multi-sampling technique when setting a pixel to a render target.

By default disabled. This is useful when multi-sampling is enabled and alpha tests are implemented in a fragment shader (e.g. to render fences, plants, or other transparent geometries).

◆ blendFactor

Vector4f CeresEngine::GPUBlendDescriptor::blendFactor = {0.0f, 0.0f, 0.0f, 0.0f}

Specifies the blending color factor.

By default (0, 0, 0, 0).

Remarks
This is only used if any blending operations of any blending target is either BlendOp::BlendFactor or BlendOp::InverseBlendFactor.

◆ independentBlendEnabled

bool CeresEngine::GPUBlendDescriptor::independentBlendEnabled = false

Specifies whether to enable independent blending in simultaneous color attachments.

By default false.

Remarks
If this is true, each color attachment has its own blending configuration described in the targets array. Otherwise, each color attachment uses the blending configuration described only by the first entry of the targets array, i.e. targets[0] and all remaining entries targets[1..7] are ignored.

◆ logicOp

GPULogicOp CeresEngine::GPUBlendDescriptor::logicOp = GPULogicOp::Disabled

Specifies the logic fragment operation.

By default LogicOp::Disabled.

Remarks
Logic pixel operations can not be used in combination with color and alpha blending. Therefore, if this is not LogicOp::Disabled, independentBlendEnabled must be false and blendEnabled of the first target must be false as well. If logic fragment operations are not supported by the renderer, this must be LogicOp::Disabled.

◆ targets

Array<GPUBlendTargetDescriptor, 8> CeresEngine::GPUBlendDescriptor::targets

Render-target blend states for the respective color attachments.

A maximum of 8 targets is supported.

Remarks
If independentBlendEnabled is set to false, only the first entry is used, i.e. targets[0] and all remaining entries targets[1..7] are ignored.

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