> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# D3D12_BLEND_OP

> Specifies RGB or alpha blending operations.

Specifies RGB or alpha blending operations.

## Syntax

```cpp theme={null}
typedef enum D3D12_BLEND_OP
{
    D3D12_BLEND_OP_ADD = 1,
    D3D12_BLEND_OP_SUBTRACT = 2,
    D3D12_BLEND_OP_REV_SUBTRACT = 3,
    D3D12_BLEND_OP_MIN = 4,
    D3D12_BLEND_OP_MAX = 5
} D3D12_BLEND_OP
```

## Constants

| Constant                        | 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](/reference/graphics/d3d12/structs/d3d12_render_target_blend_desc_public) structure. The two sources — source 1 and source 2 — are shown in the [blending block diagram](https://learn.microsoft.com/en-us/windows/desktop/direct3d11/d3d10-graphics-programming-guide-output-merger-stage).

Blend state is used by the [output-merger stage](https://learn.microsoft.com/en-us/windows/desktop/direct3d11/d3d10-graphics-programming-guide-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](/reference/graphics/d3d12/enums/d3d12_blend_public) 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\_xs.h or d3d12\_x.h\
**Library:** d3d12\_xs.lib or d3d12\_x.lib\
**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[Core Enumerations](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/direct3d-12-enumerations)


## Related topics

- [D3D12_RENDER_TARGET_BLEND_DESC](/reference/graphics/d3d12/structs/d3d12_render_target_blend_desc_public.md)
- [D3D12_BLEND_DESC](/reference/graphics/d3d12/structs/d3d12_blend_desc_public.md)
- [D3D12_LOGIC_OP](/reference/graphics/d3d12/enums/d3d12_logic_op_public.md)
- [D3D12_BLEND](/reference/graphics/d3d12/enums/d3d12_blend_public.md)
- [D3D12_AUTO_BREADCRUMB_OP](/reference/graphics/d3d12/enums/d3d12_auto_breadcrumb_op_public.md)
