docs: update RHI API docs

This commit is contained in:
2026-03-20 02:35:45 +08:00
parent ea756c0177
commit 070b444f8f
501 changed files with 13493 additions and 2022 deletions

View File

@@ -4,10 +4,18 @@
virtual void SetBlendState(const BlendState& state) = 0;
```
设置混合状态。
设置颜色混合状态。控制源颜色和目标颜色如何混合,影响最终输出像素的颜色值。
**参数:**
- `state` - 混合状态结构体
- `state` - 混合状态结构体(包含 alphaToCoverageEnable、independentBlendEnable、renderTargets[] 等)
**返回:** `void`
**异常:**
**线程安全:**
**复杂度:** O(1)
**示例:**
@@ -15,9 +23,15 @@ virtual void SetBlendState(const BlendState& state) = 0;
BlendState blendState;
blendState.alphaToCoverageEnable = false;
blendState.independentBlendEnable = false;
blendState.renderTargets[0].blendEnable = true;
blendState.renderTargets[0].srcBlend = BlendFactor::SrcAlpha;
blendState.renderTargets[0].dstBlend = BlendFactor::InvSrcAlpha;
blendState.renderTargets[0].blendOp = BlendOp::Add;
cmdList->SetBlendState(blendState);
```
## 相关文档
- [RHICommandList 总览](command-list.md) - 返回类总览
- [SetBlendFactor](set-blend-factor.md) - 设置混合因子
- [SetPipelineState](set-pipeline-state.md) - 设置管线状态