On this page

renderTargetBlend QML Value Type

Defines blending parameters for a single color attachment of a render pass. More...

Import Statement: import QtQuick3D
Since: Qt 6.11

Properties

Detailed Description

The renderTargetBlend type is used to specify blending parameters for a single color attachment of a RenderPass. An instance of renderTargetBlend can be assigned to one of the PipelineStateOverride targetBlend0 through targetBlend7 properties, where the index corresponds to the color attachment slot.

The color blend equation is:

result.rgb = srcColor * src.rgb  opColor  dstColor * dst.rgb
result.a   = srcAlpha * src.a   opAlpha  dstAlpha * dst.a

Property Documentation

blendEnabled : bool

If set to true, enables blending for the color attachment. If set to false, disables blending and the output color is written directly to the attachment. The default value is false.

colorWrite : enumeration

A bitmask that controls which color channels are written to the color attachment. Multiple values can be combined with the | operator. The default value is R | G | B | A.

ConstantDescription
RenderTargetBlend.RWrite to the red channel.
RenderTargetBlend.GWrite to the green channel.
RenderTargetBlend.BWrite to the blue channel.
RenderTargetBlend.AWrite to the alpha channel.

dstAlpha : enumeration

Sets the destination alpha blend factor. This value scales the alpha component of the current value in the color attachment before the blend operation. The default value is OneMinusSrcAlpha. See srcColor for the list of available values.

dstColor : enumeration

Sets the destination color blend factor. This value scales the RGB components of the current value in the color attachment before the blend operation. The default value is OneMinusSrcAlpha. See srcColor for the list of available values.

opAlpha : enumeration

Sets the arithmetic operation used to combine the scaled source and destination alpha components. The default value is Add. See opColor for the list of available values.

opColor : enumeration

Sets the arithmetic operation used to combine the scaled source and destination color components. The default value is Add.

ConstantDescription
RenderTargetBlend.AddResult = src + dst.
RenderTargetBlend.SubtractResult = src - dst.
RenderTargetBlend.ReverseSubtractResult = dst - src.
RenderTargetBlend.MinResult = min(src, dst).
RenderTargetBlend.MaxResult = max(src, dst).

srcAlpha : enumeration

Sets the source alpha blend factor. This value scales the alpha component of the fragment shader output before the blend operation. The default value is One. See srcColor for the list of available values.

srcColor : enumeration

Sets the source color blend factor. This value scales the RGB components of the fragment shader output before the blend operation. The default value is One.

ConstantDescription
RenderTargetBlend.ZeroFactor is (0, 0, 0).
RenderTargetBlend.OneFactor is (1, 1, 1).
RenderTargetBlend.SrcColorFactor is the source color (r, g, b).
RenderTargetBlend.OneMinusSrcColorFactor is (1-r, 1-g, 1-b) of the source.
RenderTargetBlend.DstColorFactor is the destination color (r, g, b).
RenderTargetBlend.OneMinusDstColorFactor is (1-r, 1-g, 1-b) of the destination.
RenderTargetBlend.SrcAlphaFactor is the source alpha (a, a, a).
RenderTargetBlend.OneMinusSrcAlphaFactor is (1-a, 1-a, 1-a) of the source.
RenderTargetBlend.DstAlphaFactor is the destination alpha (a, a, a).
RenderTargetBlend.OneMinusDstAlphaFactor is (1-a, 1-a, 1-a) of the destination.
RenderTargetBlend.ConstantColorFactor is the constant color set on the pipeline.
RenderTargetBlend.OneMinusConstantColorFactor is one minus the constant color.
RenderTargetBlend.ConstantAlphaFactor is the constant alpha.
RenderTargetBlend.OneMinusConstantAlphaFactor is one minus the constant alpha.
RenderTargetBlend.SrcAlphaSaturateFactor is min(src.a, 1-dst.a) for RGB, 1 for A.
RenderTargetBlend.Src1ColorFactor is from the second color output of the fragment shader.
RenderTargetBlend.OneMinusSrc1ColorFactor is one minus the second color output.
RenderTargetBlend.Src1AlphaFactor is the alpha of the second color output.
RenderTargetBlend.OneMinusSrc1AlphaFactor is one minus the alpha of the second output.

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