> ## 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.

# OMSetBlendFactor

> 设置调节像素着色器、渲染目标或两者的值的混合因子。

设置调节像素着色器、渲染目标或两者的值的混合因子。

## 语法

```cpp theme={null}
void OMSetBlendFactor(
    const FLOAT  BlendFactor
)
```

### 参数

*BlendFactor \[in, optional]*\
类型：const FLOAT \*

混合因子数组，每个 RGBA 分量一个。

### 返回值

类型：void

无。

## 备注

如果使用 [D3D12\_BLEND\_BLEND\_FACTOR](/reference/graphics/d3d12/enums/d3d12_blend_public) 或 **D3D12\_BLEND\_INV\_BLEND\_FACTOR** 创建了混合状态对象，则混合阶段将使用非 NULL 的混合因子数组。否则，混合阶段不使用非 NULL 的混合因子数组；运行时会存储这些混合因子。

如果传递 NULL，则运行时会使用或存储等于 `{ 1, 1, 1, 1 }` 的混合因子。

## 要求

**头文件：** d3d12\_xs.h 或 d3d12\_x.h\
**库：** d3d12\_xs.lib 或 d3d12\_x.lib\
**支持的平台**：XBOX Series 主机和 XBOX One 系列

## 另请参阅

[ID3D12GraphicsCommandList](/reference/graphics/d3d12_xs/interfaces/ID3D12GraphicsCommandList/id3d12graphicscommandlist_xs)


## Related topics

- [D3D12_BLEND](/zh-CN/reference/graphics/d3d12/enums/d3d12_blend_public.md)
- [D3D12_FEATURE_DATA_D3D12_OPTIONS13](/zh-CN/reference/graphics/d3d12/structs/d3d12_feature_data_d3d12_options13_public.md)
- [D3D12_BLEND_DESC](/zh-CN/reference/graphics/d3d12/structs/d3d12_blend_desc_public.md)
- [D3D12_BLEND_OP](/zh-CN/reference/graphics/d3d12/enums/d3d12_blend_op_public.md)
- [IDStorageFactoryX::SetCpuAffinity](/zh-CN/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_setcpuaffinity.md)
