Go to the documentation of this file.
35 #include "../../../Primitives/interface/BasicTypes.h"
320 #if DILIGENT_CPP_INTERFACE
335 BlendEnable {_BlendEnable },
336 LogicOperationEnable {_LogicOperationEnable },
337 SrcBlend {_SrcBlend },
338 DestBlend {_DestBlend },
340 SrcBlendAlpha {_SrcBlendAlpha },
341 DestBlendAlpha {_DestBlendAlpha },
342 BlendOpAlpha {_BlendOpAlpha },
344 RenderTargetWriteMask{_RenderTargetWriteMask}
388 #if DILIGENT_CPP_INTERFACE
395 Bool _IndependentBlendEnable,
397 AlphaToCoverageEnable {_AlphaToCoverageEnable },
398 IndependentBlendEnable {_IndependentBlendEnable},
415 bool bRTsEqual =
true;
416 for (
size_t i = 0; i < MAX_RENDER_TARGETS; ++i)
BLEND_FACTOR SrcBlend
Specifies the blend factor to apply to the RGB value output from the pixel shader Default value: Dili...
Definition: BlendState.h:286
Describes a blend state for a single render target.
Definition: BlendState.h:276
@ BLEND_OPERATION_REV_SUBTRACT
Subtract source color components from destination color components. Direct3D counterpart: D3D11_BLEN...
Definition: BlendState.h:153
LOGIC_OPERATION LogicOp
Defines logical operation for the render target. Default value: Diligent::LOGIC_OP_NOOP.
Definition: BlendState.h:314
@ LOGIC_OP_INVERT
Invert the render target. Direct3D12 counterpart: D3D12_LOGIC_OP_INVERT.
Definition: BlendState.h:225
Bool IndependentBlendEnable
Specifies whether to enable independent blending in simultaneous render targets. If set to False,...
Definition: BlendState.h:382
@ BLEND_FACTOR_INV_BLEND_FACTOR
The blend factor is one minus constant blend factor set with IDeviceContext::SetBlendFactors()....
Definition: BlendState.h:106
@ BLEND_FACTOR_INV_SRC1_ALPHA
The blend factor is 1-A, where A is the second alpha data output from a pixel shader....
Definition: BlendState.h:122
@ BLEND_FACTOR_NUM_FACTORS
Helper value that stores the total number of blend factors in the enumeration.
Definition: BlendState.h:125
Bool AlphaToCoverageEnable
Specifies whether to use alpha-to-coverage as a multisampling technique when setting a pixel to a ren...
Definition: BlendState.h:378
@ BLEND_OPERATION_NUM_OPERATIONS
Helper value that stores the total number of blend operations in the enumeration.
Definition: BlendState.h:164
@ BLEND_OPERATION_UNDEFINED
Undefined blend operation.
Definition: BlendState.h:141
@ LOGIC_OP_NOR
Perform a logical NOR operation on the render target. Direct3D12 counterpart: D3D12_LOGIC_OP_NOR.
Definition: BlendState.h:241
RenderTargetBlendDesc() noexcept
Definition: BlendState.h:322
@ BLEND_FACTOR_SRC_ALPHA_SAT
The blend factor is (f,f,f,1), where f = min(As, 1-Ad), As is alpha data from a pixel shader,...
Definition: BlendState.h:98
@ LOGIC_OP_OR
Perform a logical OR operation on the render target. Direct3D12 counterpart: D3D12_LOGIC_OP_OR.
Definition: BlendState.h:237
@ LOGIC_OP_AND_REVERSE
Perform a logical AND and reverse operation on the render target. Direct3D12 counterpart: D3D12_LOGI...
Definition: BlendState.h:253
bool operator==(const Plane3D &p1, const Plane3D &p2)
Definition: AdvancedMath.hpp:442
@ LOGIC_OP_NUM_OPERATIONS
Helper value that stores the total number of logical operations in the enumeration.
Definition: BlendState.h:268
@ BLEND_OPERATION_ADD
Add source and destination color components. Direct3D counterpart: D3D11_BLEND_OP_ADD/D3D12_BLEND_OP...
Definition: BlendState.h:145
@ LOGIC_OP_SET
Set the render target. Direct3D12 counterpart: D3D12_LOGIC_OP_SET.
Definition: BlendState.h:209
Bool LogicOperationEnable
Enable or disable a logical operation for this render target. Default value: False.
Definition: BlendState.h:282
@ COLOR_MASK_RED
Allow data to be stored in the red component.
Definition: BlendState.h:178
@ BLEND_FACTOR_INV_DEST_COLOR
The blend factor is 1-RGB, where RGB is the data from a render target. Direct3D counterpart: D3D11_B...
Definition: BlendState.h:93
@ BLEND_OPERATION_MIN
Compute the minimum of source and destination color components. Direct3D counterpart: D3D11_BLEND_OP...
Definition: BlendState.h:157
@ COLOR_MASK_ALL
Allow data to be stored in all components.
Definition: BlendState.h:190
@ LOGIC_OP_OR_REVERSE
Perform a logical OR and reverse operation on the render target. Direct3D12 counterpart: D3D12_LOGIC...
Definition: BlendState.h:261
BLEND_FACTOR
Blend factors.
Definition: BlendState.h:50
BlendStateDesc() noexcept
Definition: BlendState.h:392
@ BLEND_FACTOR_INV_SRC1_COLOR
The blend factor is 1-RGB, where RGB is the second RGB data output from a pixel shader....
Definition: BlendState.h:114
int8_t Int8
8-bit signed integer
Definition: BasicTypes.h:48
Bool BlendEnable
Enable or disable blending for this render target. Default value: False.
Definition: BlendState.h:279
@ LOGIC_OP_NAND
Perform a logical NAND operation on the render target. Direct3D12 counterpart: D3D12_LOGIC_OP_NAND.
Definition: BlendState.h:233
@ BLEND_FACTOR_UNDEFINED
Undefined blend factor.
Definition: BlendState.h:53
@ BLEND_FACTOR_SRC_ALPHA
The blend factor is alpha (A) data from a pixel shader. Direct3D counterpart: D3D11_BLEND_SRC_ALPHA/...
Definition: BlendState.h:73
#define DILIGENT_END_NAMESPACE
Definition: CommonDefinitions.h:86
RenderTargetBlendDesc RenderTargets[DILIGENT_MAX_RENDER_TARGETS]
An array of RenderTargetBlendDesc structures that describe the blend states for render targets.
Definition: BlendState.h:386
@ BLEND_OPERATION_SUBTRACT
Subtract destination color components from source color components. Direct3D counterpart: D3D11_BLEN...
Definition: BlendState.h:149
@ LOGIC_OP_XOR
Perform a logical XOR operation on the render target. Direct3D12 counterpart: D3D12_LOGIC_OP_XOR.
Definition: BlendState.h:245
@ BLEND_FACTOR_ONE
The blend factor is one. Direct3D counterpart: D3D11_BLEND_ONE/D3D12_BLEND_ONE. OpenGL counterpart: ...
Definition: BlendState.h:61
@ LOGIC_OP_AND_INVERTED
Perform a logical AND and invert operation on the render target. Direct3D12 counterpart: D3D12_LOGIC...
Definition: BlendState.h:257
#define DEFAULT_INITIALIZER(x)
Definition: CommonDefinitions.h:93
bool Bool
Boolean.
Definition: BasicTypes.h:59
@ BLEND_FACTOR_ZERO
The blend factor is zero. Direct3D counterpart: D3D11_BLEND_ZERO/D3D12_BLEND_ZERO....
Definition: BlendState.h:57
@ BLEND_FACTOR_INV_DEST_ALPHA
The blend factor is 1-A, where A is alpha data from a render target. Direct3D counterpart: D3D11_BLE...
Definition: BlendState.h:85
@ BLEND_FACTOR_SRC_COLOR
The blend factor is RGB data from a pixel shader. Direct3D counterpart: D3D11_BLEND_SRC_COLOR/D3D12_...
Definition: BlendState.h:65
@ LOGIC_OP_COPY_INVERTED
Perform an inverted-copy of the render target. Direct3D12 counterpart: D3D12_LOGIC_OP_COPY_INVERTED.
Definition: BlendState.h:217
@ BLEND_FACTOR_DEST_ALPHA
The blend factor is alpha (A) data from a render target. Direct3D counterpart: D3D11_BLEND_DEST_ALPH...
Definition: BlendState.h:81
BLEND_FACTOR SrcBlendAlpha
Specifies the blend factor to apply to the alpha value output from the pixel shader....
Definition: BlendState.h:300
@ BLEND_FACTOR_INV_SRC_ALPHA
The blend factor is 1-A, where A is alpha data from a pixel shader. Direct3D counterpart: D3D11_BLEN...
Definition: BlendState.h:77
@ BLEND_FACTOR_BLEND_FACTOR
The blend factor is the constant blend factor set with IDeviceContext::SetBlendFactors()....
Definition: BlendState.h:102
LOGIC_OPERATION
Logic operation.
Definition: BlendState.h:201
BLEND_FACTOR DestBlend
Specifies the blend factor to apply to the RGB value in the render target Default value: Diligent::BL...
Definition: BlendState.h:290
BLEND_OPERATION BlendOp
Defines how to combine the source and destination RGB values after applying the SrcBlend and DestBlen...
Definition: BlendState.h:295
COLOR_MASK
Color component write flags.
Definition: BlendState.h:172
@ BLEND_FACTOR_SRC1_ALPHA
The blend factor is the second alpha (A) data output from a pixel shader. Direct3D counterpart: D3D1...
Definition: BlendState.h:118
@ BLEND_FACTOR_SRC1_COLOR
The blend factor is the second RGB data output from a pixel shader. Direct3D counterpart: D3D11_BLEN...
Definition: BlendState.h:110
Uint8 RenderTargetWriteMask
Render target write mask. Default value: Diligent::COLOR_MASK_ALL.
Definition: BlendState.h:318
@ BLEND_OPERATION_MAX
Compute the maximum of source and destination color components. Direct3D counterpart: D3D11_BLEND_OP...
Definition: BlendState.h:161
#define DILIGENT_TYPED_ENUM(EnumName, EnumType)
Definition: CommonDefinitions.h:88
@ BLEND_FACTOR_DEST_COLOR
The blend factor is RGB data from a render target. Direct3D counterpart: D3D11_BLEND_DEST_COLOR/D3D1...
Definition: BlendState.h:89
@ LOGIC_OP_NOOP
No operation is performed on the render target. Direct3D12 counterpart: D3D12_LOGIC_OP_NOOP.
Definition: BlendState.h:221
BlendStateDesc(Bool _AlphaToCoverageEnable, Bool _IndependentBlendEnable, const RenderTargetBlendDesc &RT0=RenderTargetBlendDesc{}) noexcept
Definition: BlendState.h:394
@ LOGIC_OP_OR_INVERTED
Perform a logical OR and invert operation on the render target. Direct3D12 counterpart: D3D12_LOGIC_...
Definition: BlendState.h:265
@ COLOR_MASK_GREEN
Allow data to be stored in the green component.
Definition: BlendState.h:181
uint8_t Uint8
8-bit unsigned integer
Definition: BasicTypes.h:53
BLEND_OPERATION BlendOpAlpha
Defines how to combine the source and destination alpha values after applying the SrcBlendAlpha and D...
Definition: BlendState.h:310
BLEND_OPERATION
Blending operation.
Definition: BlendState.h:138
#define DILIGENT_BEGIN_NAMESPACE(Name)
Definition: CommonDefinitions.h:82
@ LOGIC_OP_COPY
Copy the render target. Direct3D12 counterpart: D3D12_LOGIC_OP_COPY.
Definition: BlendState.h:213
@ BLEND_FACTOR_INV_SRC_COLOR
The blend factor is 1-RGB, where RGB is the data from a pixel shader. Direct3D counterpart: D3D11_BL...
Definition: BlendState.h:69
struct RenderTargetBlendDesc RenderTargetBlendDesc
Definition: BlendState.h:368
@ COLOR_MASK_NONE
Do not store any components.
Definition: BlendState.h:175
BLEND_FACTOR DestBlendAlpha
Specifies the blend factor to apply to the alpha value in the render target. Blend factors that end i...
Definition: BlendState.h:305
@ LOGIC_OP_CLEAR
Clear the render target. Direct3D12 counterpart: D3D12_LOGIC_OP_CLEAR.
Definition: BlendState.h:205
@ COLOR_MASK_ALPHA
Allow data to be stored in the alpha component.
Definition: BlendState.h:187
@ LOGIC_OP_EQUIV
Perform a logical equal operation on the render target. Direct3D12 counterpart: D3D12_LOGIC_OP_EQUIV...
Definition: BlendState.h:249
@ COLOR_MASK_BLUE
Allow data to be stored in the blue component.
Definition: BlendState.h:184
#define DILIGENT_MAX_RENDER_TARGETS
The maximum number of simultaneous render targets.
Definition: Constants.h:42
RenderTargetBlendDesc(Bool _BlendEnable, Bool _LogicOperationEnable=RenderTargetBlendDesc{}.LogicOperationEnable, BLEND_FACTOR _SrcBlend=RenderTargetBlendDesc{}.SrcBlend, BLEND_FACTOR _DestBlend=RenderTargetBlendDesc{}.DestBlend, BLEND_OPERATION _BlendOp=RenderTargetBlendDesc{}.BlendOp, BLEND_FACTOR _SrcBlendAlpha=RenderTargetBlendDesc{}.SrcBlendAlpha, BLEND_FACTOR _DestBlendAlpha=RenderTargetBlendDesc{}.DestBlendAlpha, BLEND_OPERATION _BlendOpAlpha=RenderTargetBlendDesc{}.BlendOpAlpha, LOGIC_OPERATION _LogicOp=RenderTargetBlendDesc{}.LogicOp, Uint8 _RenderTargetWriteMask=RenderTargetBlendDesc{}.RenderTargetWriteMask)
Definition: BlendState.h:325
@ LOGIC_OP_AND
Perform a logical AND operation on the render target. Direct3D12 counterpart: D3D12_LOGIC_OP_AND.
Definition: BlendState.h:229
Blend state description.
Definition: BlendState.h:374
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37
bool operator==(const BlendStateDesc &RHS) const
Comparison operator tests if two structures are equivalent.
Definition: BlendState.h:413