D3D12_BLEND_OP enumeration (d3d12.h)

Specifies RGB or alpha blending operations.

Syntax

typedef enum D3D12_BLEND_OP {
  D3D12_BLEND_OP_ADD,
  D3D12_BLEND_OP_SUBTRACT,
  D3D12_BLEND_OP_REV_SUBTRACT,
  D3D12_BLEND_OP_MIN,
  D3D12_BLEND_OP_MAX
} ;

Constants

Name Description
D3D12_BLEND_OP_ADD Add source 1 and source 2.
D3D12_BLEND_OP_SUBTRACT Subtract source 1 from source 2.
D3D12_BLEND_OP_REV_SUBTRACT Subtract source 2 from source 1.
D3D12_BLEND_OP_MIN Find the minimum of source 1 and source 2.
D3D12_BLEND_OP_MAX Find the maximum of source 1 and source 2.

Remarks

The runtime implements RGB blending and alpha blending separately. Therefore, blend state requires separate blend operations for RGB data and alpha data. These blend operations are specified in a D3D12_RENDER_TARGET_BLEND_DESC structure. The two sources —source 1 and source 2— are shown in the blending block diagram.

Blend state is used by the output-merger stage to determine how to blend together two RGB pixel values and two alpha values. The two RGB pixel values and two alpha values are the RGB pixel value and alpha value that the pixel shader outputs and the RGB pixel value and alpha value already in the output render target. The D3D12_BLEND value controls the data source that the blending stage uses to modulate values for the pixel shader, render target, or both. The D3D12_BLEND_OP value controls how the blending stage mathematically combines these modulated values.

Requirements

   
Header d3d12.h

See also

Core Enumerations