vulkan-3.6: Bindings to the Vulkan graphics API.
Safe HaskellNone
LanguageHaskell2010

Vulkan.Core10.Enums.BlendOp

Synopsis

Documentation

newtype BlendOp Source #

VkBlendOp - Framebuffer blending operations

Description

The semantics of each basic blend operations is described in the table below:

BlendOp RGB Components Alpha Component
BLEND_OP_ADD R = Rs0 × Sr + Rd × Dr G = Gs0 × Sg + Gd × Dg B = Bs0 × Sb + Bd × Db A = As0 × Sa + Ad × Da
BLEND_OP_SUBTRACT R = Rs0 × Sr - Rd × Dr G = Gs0 × Sg - Gd × Dg B = Bs0 × Sb - Bd × Db A = As0 × Sa - Ad × Da
BLEND_OP_REVERSE_SUBTRACT R = Rd × Dr - Rs0 × Sr G = Gd × Dg - Gs0 × Sg B = Bd × Db - Bs0 × Sb A = Ad × Da - As0 × Sa
BLEND_OP_MIN R = min(Rs0,Rd) G = min(Gs0,Gd) B = min(Bs0,Bd) A = min(As0,Ad)
BLEND_OP_MAX 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

PipelineColorBlendAttachmentState

Constructors

BlendOp Int32 

Bundled Patterns

pattern BLEND_OP_ADD :: BlendOp 
pattern BLEND_OP_SUBTRACT :: BlendOp 
pattern BLEND_OP_REVERSE_SUBTRACT :: BlendOp 
pattern BLEND_OP_MIN :: BlendOp 
pattern BLEND_OP_MAX :: BlendOp 
pattern BLEND_OP_BLUE_EXT :: BlendOp 
pattern BLEND_OP_GREEN_EXT :: BlendOp 
pattern BLEND_OP_RED_EXT :: BlendOp 
pattern BLEND_OP_INVERT_OVG_EXT :: BlendOp 
pattern BLEND_OP_CONTRAST_EXT :: BlendOp 
pattern BLEND_OP_MINUS_CLAMPED_EXT :: BlendOp 
pattern BLEND_OP_MINUS_EXT :: BlendOp 
pattern BLEND_OP_PLUS_DARKER_EXT :: BlendOp 
pattern BLEND_OP_PLUS_CLAMPED_ALPHA_EXT :: BlendOp 
pattern BLEND_OP_PLUS_CLAMPED_EXT :: BlendOp 
pattern BLEND_OP_PLUS_EXT :: BlendOp 
pattern BLEND_OP_HSL_LUMINOSITY_EXT :: BlendOp 
pattern BLEND_OP_HSL_COLOR_EXT :: BlendOp 
pattern BLEND_OP_HSL_SATURATION_EXT :: BlendOp 
pattern BLEND_OP_HSL_HUE_EXT :: BlendOp 
pattern BLEND_OP_HARDMIX_EXT :: BlendOp 
pattern BLEND_OP_PINLIGHT_EXT :: BlendOp 
pattern BLEND_OP_LINEARLIGHT_EXT :: BlendOp 
pattern BLEND_OP_VIVIDLIGHT_EXT :: BlendOp 
pattern BLEND_OP_LINEARBURN_EXT :: BlendOp 
pattern BLEND_OP_LINEARDODGE_EXT :: BlendOp 
pattern BLEND_OP_INVERT_RGB_EXT :: BlendOp 
pattern BLEND_OP_INVERT_EXT :: BlendOp 
pattern BLEND_OP_EXCLUSION_EXT :: BlendOp 
pattern BLEND_OP_DIFFERENCE_EXT :: BlendOp 
pattern BLEND_OP_SOFTLIGHT_EXT :: BlendOp 
pattern BLEND_OP_HARDLIGHT_EXT :: BlendOp 
pattern BLEND_OP_COLORBURN_EXT :: BlendOp 
pattern BLEND_OP_COLORDODGE_EXT :: BlendOp 
pattern BLEND_OP_LIGHTEN_EXT :: BlendOp 
pattern BLEND_OP_DARKEN_EXT :: BlendOp 
pattern BLEND_OP_OVERLAY_EXT :: BlendOp 
pattern BLEND_OP_SCREEN_EXT :: BlendOp 
pattern BLEND_OP_MULTIPLY_EXT :: BlendOp 
pattern BLEND_OP_XOR_EXT :: BlendOp 
pattern BLEND_OP_DST_ATOP_EXT :: BlendOp 
pattern BLEND_OP_SRC_ATOP_EXT :: BlendOp 
pattern BLEND_OP_DST_OUT_EXT :: BlendOp 
pattern BLEND_OP_SRC_OUT_EXT :: BlendOp 
pattern BLEND_OP_DST_IN_EXT :: BlendOp 
pattern BLEND_OP_SRC_IN_EXT :: BlendOp 
pattern BLEND_OP_DST_OVER_EXT :: BlendOp 
pattern BLEND_OP_SRC_OVER_EXT :: BlendOp 
pattern BLEND_OP_DST_EXT :: BlendOp 
pattern BLEND_OP_SRC_EXT :: BlendOp 
pattern BLEND_OP_ZERO_EXT :: BlendOp