Top Description Fields Constructors Methods
org.lwjgl.vulkan

public final Class EXTBlendOperationAdvanced

extends Object
Class Inheritance

This extension adds a number of “advanced” blending operations that can be used to perform new color blending operations, many of which are more complex than the standard blend modes provided by unextended Vulkan. This extension requires different styles of usage, depending on the level of hardware support and the enabled features:

In unextended Vulkan, the set of blending operations is limited, and can be expressed very simply. The BLEND_OP_MIN and BLEND_OP_MAX blend operations simply compute component-wise minimums or maximums of source and destination color components. The BLEND_OP_ADD, BLEND_OP_SUBTRACT, and BLEND_OP_REVERSE_SUBTRACT modes multiply the source and destination colors by source and destination factors and either add the two products together or subtract one from the other. This limited set of operations supports many common blending operations but precludes the use of more sophisticated transparency and blending operations commonly available in many dedicated imaging APIs.

This extension provides a number of new “advanced” blending operations. Unlike traditional blending operations using BLEND_OP_ADD, these blending equations do not use source and destination factors specified by VkBlendFactor. Instead, each blend operation specifies a complete equation based on the source and destination colors. These new blend operations are used for both RGB and alpha components; they must not be used to perform separate RGB and alpha blending (via different values of color and alpha VkBlendOp).

These blending operations are performed using premultiplied colors, where RGB colors can be considered premultiplied or non-premultiplied by alpha, according to the srcPremultiplied and dstPremultiplied members of VkPipelineColorBlendAdvancedStateCreateInfoEXT. If a color is considered non-premultiplied, the (R,G,B) color components are multiplied by the alpha component prior to blending. For non-premultiplied color components in the range [0,1], the corresponding premultiplied color component would have values in the range [0 × A, 1 × A].

Many of these advanced blending equations are formulated where the result of blending source and destination colors with partial coverage have three separate contributions: from the portions covered by both the source and the destination, from the portion covered only by the source, and from the portion covered only by the destination. The blend parameter VkPipelineColorBlendAdvancedStateCreateInfoEXT::blendOverlap can be used to specify a correlation between source and destination pixel coverage. If set to BLEND_OVERLAP_CONJOINT_EXT, the source and destination are considered to have maximal overlap, as would be the case if drawing two objects on top of each other. If set to BLEND_OVERLAP_DISJOINT_EXT, the source and destination are considered to have minimal overlap, as would be the case when rendering a complex polygon tessellated into individual non-intersecting triangles. If set to BLEND_OVERLAP_UNCORRELATED_EXT, the source and destination coverage are assumed to have no spatial correlation within the pixel.

In addition to the coherency issues on implementations not supporting advancedBlendCoherentOperations, this extension has several limitations worth noting. First, the new blend operations have a limit on the number of color attachments they can be used with, as indicated by VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT::advancedBlendMaxColorAttachments. Additionally, blending precision may be limited to 16-bit floating-point, which may result in a loss of precision and dynamic range for framebuffer formats with 32-bit floating-point components, and in a loss of precision for formats with 12- and 16-bit signed or unsigned normalized integer components.

VK_EXT_blend_operation_advanced
Name String
VK_EXT_blend_operation_advanced
Extension Type
Device extension
Registered Extension Number
149
Revision
2
Extension and Version Dependencies
VK_KHR_get_physical_device_properties2 or Version 1.1
Contact
Other Extension Metadata
Last Modified Date
2017-06-12
Contributors
  • Jeff Bolz, NVIDIA

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
VK_BLEND_OP_BLUE_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_COLORBURN_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_COLORDODGE_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_CONTRAST_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_DARKEN_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_DIFFERENCE_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_DST_ATOP_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_DST_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_DST_IN_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_DST_OUT_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_DST_OVER_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_EXCLUSION_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_GREEN_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_HARDLIGHT_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_HARDMIX_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_HSL_COLOR_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_HSL_HUE_EXT

Extends VkBlendOp.

public static final int
public static final int
public static final int
VK_BLEND_OP_INVERT_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_INVERT_OVG_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_INVERT_RGB_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_LIGHTEN_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_LINEARBURN_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_LINEARDODGE_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_LINEARLIGHT_EXT

Extends VkBlendOp.

public static final int
public static final int
VK_BLEND_OP_MINUS_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_MULTIPLY_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_OVERLAY_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_PINLIGHT_EXT

Extends VkBlendOp.

public static final int
public static final int
VK_BLEND_OP_PLUS_CLAMPED_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_PLUS_DARKER_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_PLUS_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_RED_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_SCREEN_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_SOFTLIGHT_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_SRC_ATOP_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_SRC_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_SRC_IN_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_SRC_OUT_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_SRC_OVER_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_VIVIDLIGHT_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_XOR_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OP_ZERO_EXT

Extends VkBlendOp.

public static final int
VK_BLEND_OVERLAP_CONJOINT_EXT

VkBlendOverlapEXT - Enumerant specifying the blend overlap parameter Description

public static final int
VK_BLEND_OVERLAP_DISJOINT_EXT

VkBlendOverlapEXT - Enumerant specifying the blend overlap parameter Description

public static final int
VK_BLEND_OVERLAP_UNCORRELATED_EXT

VkBlendOverlapEXT - Enumerant specifying the blend overlap parameter Description

public static final String
public static final int
VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION

The extension specification version.

public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait