Files
XCEngine/docs/api/rhi/enums/blend-op.md
2026-03-20 02:35:45 +08:00

41 lines
830 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# BlendOp
**命名空间**: `XCEngine::RHI`
**类型**: `enum class`
**描述**: 混合操作枚举,定义颜色混合的运算方式
## 概述
BlendOp 枚举定义了源颜色和目标颜色之间的混合运算方式,用于实现各种透明和混合效果。
## 枚举值
| 枚举值 | 描述 |
|--------|------|
| `Add` | 加法混合Src + Dst |
| `Subtract` | 减法混合Src - Dst |
| `ReverseSubtract` | 反向减法混合Dst - Src |
| `Min` | 取最小值 |
| `Max` | 取最大值 |
## 使用示例
```cpp
#include "RHI/RHIEnums.h"
void Example() {
BlendOp blendOp = BlendOp::Add;
if (blendOp == BlendOp::Subtract) {
// 使用减法混合
}
}
```
## 相关文档
- [BlendFactor](blend-factor.md) - 混合因子枚举
- [LogicOp](logic-op.md) - 逻辑操作枚举