<blending> (//pfx/pipeline/blending)

<blending> element configures blending for colour attachments

<blending> element configures blending for colour attachments. It may be defined for all framebuffer colour attachments at once, or for each separately. If no alpha blending is required, this element should be omitted.

The blend function is

OutputColor = SrcColor * SrcColorFactor [ColorOp] DstColor * DstColorFactor
OutputAlpha = SrcAlpha * SrcAlphaFactor [AlphaOp] DstAlpha* DstAlphaFactor

with the exception of the MIN and MAX operations, that ignore the src and dst factors.

XML Attributes (<blending> element)




(OPTIONAL) The colour attachment that this blending configuration applies to. If not defined, applies to all colour attachments


(OPTIONAL) Set to true to enable alpha blending, false to disable.

Default false


(OPTIONAL) Set the blend factor for the specified item {srcColorFactor, srcAlphaFactor, dstColorFactor, dstAlphaFactor}.

Valid values: zero, one, srcColor, oneMinusSrcColor, srcAlpha, oneMinusSrcAlpha, dstColor, oneMinusDstColor, dstAlpha, oneMinusDstAlpha.

Default - Src: one, Dst: zero


(OPTIONAL) Set the blend operation for the specified item (Color or Alpha.

Valid values: add, subtract, reverseSubtract, min, max

Default: add


(OPTIONAL) Set the color write mask.

Valid values: none or any combination of 'rgba'

Default: rgba