VkBlendOp - Framebuffer blending operations
Description
The semantics of the basic blend operations are described in the table below:
RGB Components | Alpha Component | |
|---|---|---|
| R = Rs0 × Sr + Rd × Dr G = Gs0 × Sg + Gd × Dg B = Bs0 × Sb + Bd × Db | A = As0 × Sa + Ad × Da |
| R = Rs0 × Sr - Rd × Dr G = Gs0 × Sg - Gd × Dg B = Bs0 × Sb - Bd × Db | A = As0 × Sa - Ad × Da |
| R = Rd × Dr - Rs0 × Sr G = Gd × Dg - Gs0 × Sg B = Bd × Db - Bs0 × Sb | A = Ad × Da - As0 × Sa |
| R = min(Rs0,Rd) G = min(Gs0,Gd) B = min(Bs0,Bd) | A = min(As0,Ad) |
| R = max(Rs0,Rd) G = max(Gs0,Gd) B = max(Bs0,Bd) | A = max(As0,Ad) |
Basic Blend Operations
In this table, the following conventions are used:
Rs0, Gs0, Bs0 and As0 represent the first source color R, G, B, and A components, respectively.
Rd, Gd, Bd and Ad represent the R, G, B, and A components of the destination color. That is, the color currently in the corresponding color attachment for this fragment/sample.
Sr, Sg, Sb and Sa represent the source blend factor R, G, B, and A components, respectively.
Dr, Dg, Db and Da represent the destination blend factor R, G, B, and A components, respectively.
The blending operation produces a new set of values R, G, B and A, which are written to the framebuffer attachment. If blending is not enabled for this attachment, then R, G, B and A are assigned Rs0, Gs0, Bs0 and As0, respectively.
If the color attachment is fixed-point, the components of the source and destination values and blend factors are each clamped to [0,1] or [-1,1] respectively for an unsigned normalized or signed normalized color attachment prior to evaluating the blend operations. If the color attachment is floating-point, no clamping occurs.
See Also
VK_VERSION_1_0, ColorBlendAdvancedEXT, ColorBlendEquationEXT, PipelineColorBlendAttachmentState
Instances6Eq, Ord, Read, Show, Storable, Zero
Eq BlendOpDefined in vulkan-3.27 · Vulkan.Core10.Enums.BlendOpOrd BlendOpDefined in vulkan-3.27 · Vulkan.Core10.Enums.BlendOpRead BlendOpDefined in vulkan-3.27 · Vulkan.Core10.Enums.BlendOpShow BlendOpDefined in vulkan-3.27 · Vulkan.Core10.Enums.BlendOpStorable BlendOpDefined in vulkan-3.27 · Vulkan.Core10.Enums.BlendOpZero BlendOpDefined in vulkan-3.27 · Vulkan.Core10.Enums.BlendOp