renderTargetBlend QML Value Type
定义渲染通道中单个颜色附件的混合参数。更多...
| Import Statement: | import QtQuick3D |
| Since: | Qt 6.11 |
属性
- blendEnabled : bool
- colorWrite : enumeration
- dstAlpha : enumeration
- dstColor : enumeration
- opAlpha : enumeration
- opColor : enumeration
- srcAlpha : enumeration
- srcColor : enumeration
详细说明
renderTargetBlend 类型用于指定RenderPass 的单个颜色附件的混合参数。renderTargetBlend 的实例可分配给PipelineStateOverride 中的以下属性之一:targetBlend0 至targetBlend7 ,其中索引对应于颜色附件的插槽。
颜色混合方程为:
result.rgb = srcColor * src.rgb opColor dstColor * dst.rgb
result.a = srcAlpha * src.a opAlpha dstAlpha * dst.a属性文档
blendEnabled : bool
如果设置为true ,则启用颜色附件的混合功能。如果设置为false ,则禁用混合功能,输出颜色将直接写入附件。默认值为false 。
colorWrite : enumeration
一个位掩码,用于控制哪些颜色通道将写入颜色附件。多个值可以使用| 运算符组合。默认值为R | G | B | A 。
| 常量 | 描述 |
|---|---|
RenderTargetBlend.R | 写入红色通道。 |
RenderTargetBlend.G | 写入绿色通道。 |
RenderTargetBlend.B | 写入蓝色通道。 |
RenderTargetBlend.A | 写入阿尔法通道。 |
dstAlpha : enumeration
设置目标透明度混合因子。该值用于在混合操作之前,对颜色附件中当前值的透明度分量进行缩放。默认值为OneMinusSrcAlpha 。可用值列表请参见srcColor 。
dstColor : enumeration
设置目标颜色混合因子。该值用于在混合操作之前对颜色附件中当前值的 RGB 分量进行缩放。默认值为OneMinusSrcAlpha 。可用值的列表请参见srcColor 。
opAlpha : enumeration
设置用于组合缩放后的源和目标透明度分量的算术运算。默认值为Add 。有关可用值的列表,请参阅opColor 。
opColor : enumeration
设置用于组合缩放后的源色和目标色分量的算术运算。默认值为Add 。
| 常量 | 描述 |
|---|---|
RenderTargetBlend.Add | 结果 = 源 + 目标。 |
RenderTargetBlend.Subtract | 结果 = src - dst。 |
RenderTargetBlend.ReverseSubtract | 结果 = dst - src。 |
RenderTargetBlend.Min | 结果 = min(src, dst)。 |
RenderTargetBlend.Max | 结果 = max(src, dst)。 |
srcAlpha : enumeration
设置源透明度混合系数。该值用于在混合操作之前对片段着色器输出的透明度分量进行缩放。默认值为One 。可用值的列表请参见srcColor 。
srcColor : enumeration
设置源颜色混合因子。该值用于在混合操作之前对片段着色器输出的RGB分量进行缩放。默认值为One 。
| 常量 | 描述 |
|---|---|
RenderTargetBlend.Zero | 系数为 (0, 0, 0)。 |
RenderTargetBlend.One | 因子为 (0, 0, 0)。 |
RenderTargetBlend.SrcColor | 因子为源颜色 (r, g, b)。 |
RenderTargetBlend.OneMinusSrcColor | 因子是源色的 (1-r, 1-g, 1-b)。 |
RenderTargetBlend.DstColor | 因子是目标颜色 (r, g, b)。 |
RenderTargetBlend.OneMinusDstColor | 因子是目标色的 (1-r, 1-g, 1-b)。 |
RenderTargetBlend.SrcAlpha | 因子是源图像的透明度 (a, a, a)。 |
RenderTargetBlend.OneMinusSrcAlpha | 因子是源的 (1-a, 1-a, 1-a)。 |
RenderTargetBlend.DstAlpha | 因子是目标的透明度 (a, a, a)。 |
RenderTargetBlend.OneMinusDstAlpha | 因子是目标的 (1-a, 1-a, 1-a)。 |
RenderTargetBlend.ConstantColor | 因子是管道上设置的恒定颜色。 |
RenderTargetBlend.OneMinusConstantColor | 该因子等于恒定颜色减去1。 |
RenderTargetBlend.ConstantAlpha | 因子是常量透明度。 |
RenderTargetBlend.OneMinusConstantAlpha | 因子是常量透明度减去 1。 |
RenderTargetBlend.SrcAlphaSaturate | 对于 RGB,因子为 min(src.a, 1-dst.a);对于 A,因子为 1。 |
RenderTargetBlend.Src1Color | 因子取自片段着色器的第二个颜色输出。 |
RenderTargetBlend.OneMinusSrc1Color | 因子等于 1 减去第二个颜色输出。 |
RenderTargetBlend.Src1Alpha | 因子是第二个颜色输出的透明度(alpha)。 |
RenderTargetBlend.OneMinusSrc1Alpha | 因子等于1减去第二个输出的透明度。 |
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.