> ## 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](/zh-TW/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](/zh-TW/reference/graphics/d3d12_xs/interfaces/ID3D12GraphicsCommandList/id3d12graphicscommandlist_xs)


## Related topics

- [D3D12_BLEND](/zh-TW/reference/graphics/d3d12/enums/d3d12_blend_public.md)
- [D3D12_FEATURE_DATA_D3D12_OPTIONS13](/zh-TW/reference/graphics/d3d12/structs/d3d12_feature_data_d3d12_options13_public.md)
- [D3D12_BLEND_DESC](/zh-TW/reference/graphics/d3d12/structs/d3d12_blend_desc_public.md)
- [D3D12_BLEND_OP](/zh-TW/reference/graphics/d3d12/enums/d3d12_blend_op_public.md)
- [D3D12_RENDER_TARGET_BLEND_DESC](/zh-TW/reference/graphics/d3d12/structs/d3d12_render_target_blend_desc_public.md)
