VkLogicOp - Framebuffer logical operations
Description
The logical operations supported by Vulkan are summarized in the following table in which
¬ is bitwise invert,
∧ is bitwise and,
∨ is bitwise or,
⊕ is bitwise exclusive or,
s is the fragment’s Rs0, Gs0, Bs0 or As0 component value for the fragment output corresponding to the color attachment being updated, and
d is the color attachment’s R, G, B or A component value:
Mode | Operation |
|---|---|
0 | |
s ∧ d | |
s ∧ ¬ d | |
s | |
¬ s ∧ d | |
d | |
s ⊕ d | |
s ∨ d | |
¬ (s ∨ d) | |
¬ (s ⊕ d) | |
¬ d | |
s ∨ ¬ d | |
¬ s | |
¬ s ∨ d | |
¬ (s ∧ d) | |
all 1s |
Logical Operations
The result of the logical operation is then written to the color attachment as controlled by the component write mask, described in Blend Operations.
See Also
VK_VERSION_1_0, PipelineColorBlendStateCreateInfo, cmdSetLogicOpEXT
Instances6Eq, Ord, Read, Show, Storable, Zero
Eq LogicOpDefined in vulkan-3.27 · Vulkan.Core10.Enums.LogicOpOrd LogicOpDefined in vulkan-3.27 · Vulkan.Core10.Enums.LogicOpRead LogicOpDefined in vulkan-3.27 · Vulkan.Core10.Enums.LogicOpShow LogicOpDefined in vulkan-3.27 · Vulkan.Core10.Enums.LogicOpStorable LogicOpDefined in vulkan-3.27 · Vulkan.Core10.Enums.LogicOpZero LogicOpDefined in vulkan-3.27 · Vulkan.Core10.Enums.LogicOp