Struct BlendAttachmentDescription
- Namespace
- NeoVeldrid
- Assembly
- NeoVeldrid.dll
A Pipeline component describing the blend behavior for an individual color attachment.
public struct BlendAttachmentDescription : IEquatable<BlendAttachmentDescription>
- Implements
- Inherited Members
Constructors
BlendAttachmentDescription(bool, BlendFactor, BlendFactor, BlendFunction, BlendFactor, BlendFactor, BlendFunction)
Constructs a new BlendAttachmentDescription.
public BlendAttachmentDescription(bool blendEnabled, BlendFactor sourceColorFactor, BlendFactor destinationColorFactor, BlendFunction colorFunction, BlendFactor sourceAlphaFactor, BlendFactor destinationAlphaFactor, BlendFunction alphaFunction)
Parameters
blendEnabledboolControls whether blending is enabled for the color attachment.
sourceColorFactorBlendFactorControls the source color's influence on the blend result.
destinationColorFactorBlendFactorControls the destination color's influence on the blend result.
colorFunctionBlendFunctionControls the function used to combine the source and destination color factors.
sourceAlphaFactorBlendFactorControls the source alpha's influence on the blend result.
destinationAlphaFactorBlendFactorControls the destination alpha's influence on the blend result.
alphaFunctionBlendFunctionControls the function used to combine the source and destination alpha factors.
BlendAttachmentDescription(bool, ColorWriteMask, BlendFactor, BlendFactor, BlendFunction, BlendFactor, BlendFactor, BlendFunction)
Constructs a new BlendAttachmentDescription.
public BlendAttachmentDescription(bool blendEnabled, ColorWriteMask colorWriteMask, BlendFactor sourceColorFactor, BlendFactor destinationColorFactor, BlendFunction colorFunction, BlendFactor sourceAlphaFactor, BlendFactor destinationAlphaFactor, BlendFunction alphaFunction)
Parameters
blendEnabledboolControls whether blending is enabled for the color attachment.
colorWriteMaskColorWriteMaskControls which components of the color will be written to the framebuffer.
sourceColorFactorBlendFactorControls the source color's influence on the blend result.
destinationColorFactorBlendFactorControls the destination color's influence on the blend result.
colorFunctionBlendFunctionControls the function used to combine the source and destination color factors.
sourceAlphaFactorBlendFactorControls the source alpha's influence on the blend result.
destinationAlphaFactorBlendFactorControls the destination alpha's influence on the blend result.
alphaFunctionBlendFunctionControls the function used to combine the source and destination alpha factors.
Fields
AdditiveBlend
Describes a blend attachment state in which the source is added to the destination based on its alpha channel. Settings: BlendEnabled = true ColorWriteMask = null SourceColorFactor = BlendFactor.SourceAlpha DestinationColorFactor = BlendFactor.One ColorFunction = BlendFunction.Add SourceAlphaFactor = BlendFactor.SourceAlpha DestinationAlphaFactor = BlendFactor.One AlphaFunction = BlendFunction.Add
public static readonly BlendAttachmentDescription AdditiveBlend
Field Value
AlphaBlend
Describes a blend attachment state in which the source and destination are blended in an inverse relationship. Settings: BlendEnabled = true ColorWriteMask = null SourceColorFactor = BlendFactor.SourceAlpha DestinationColorFactor = BlendFactor.InverseSourceAlpha ColorFunction = BlendFunction.Add SourceAlphaFactor = BlendFactor.SourceAlpha DestinationAlphaFactor = BlendFactor.InverseSourceAlpha AlphaFunction = BlendFunction.Add
public static readonly BlendAttachmentDescription AlphaBlend
Field Value
AlphaFunction
Controls the function used to combine the source and destination alpha factors.
public BlendFunction AlphaFunction
Field Value
BlendEnabled
Controls whether blending is enabled for the color attachment.
public bool BlendEnabled
Field Value
ColorFunction
Controls the function used to combine the source and destination color factors.
public BlendFunction ColorFunction
Field Value
ColorWriteMask
Controls which components of the color will be written to the framebuffer.
If null, the mask will be set to All.
public ColorWriteMask? ColorWriteMask
Field Value
DestinationAlphaFactor
Controls the destination alpha's influence on the blend result.
public BlendFactor DestinationAlphaFactor
Field Value
DestinationColorFactor
Controls the destination color's influence on the blend result.
public BlendFactor DestinationColorFactor
Field Value
Disabled
Describes a blend attachment state in which blending is disabled. Settings: BlendEnabled = false ColorWriteMask = null SourceColorFactor = BlendFactor.One DestinationColorFactor = BlendFactor.Zero ColorFunction = BlendFunction.Add SourceAlphaFactor = BlendFactor.One DestinationAlphaFactor = BlendFactor.Zero AlphaFunction = BlendFunction.Add
public static readonly BlendAttachmentDescription Disabled
Field Value
OverrideBlend
Describes a blend attachment state in which the source completely overrides the destination. Settings: BlendEnabled = true ColorWriteMask = null SourceColorFactor = BlendFactor.One DestinationColorFactor = BlendFactor.Zero ColorFunction = BlendFunction.Add SourceAlphaFactor = BlendFactor.One DestinationAlphaFactor = BlendFactor.Zero AlphaFunction = BlendFunction.Add
public static readonly BlendAttachmentDescription OverrideBlend
Field Value
SourceAlphaFactor
Controls the source alpha's influence on the blend result.
public BlendFactor SourceAlphaFactor
Field Value
SourceColorFactor
Controls the source color's influence on the blend result.
public BlendFactor SourceColorFactor
Field Value
Methods
Equals(BlendAttachmentDescription)
Element-wise equality.
public bool Equals(BlendAttachmentDescription other)
Parameters
otherBlendAttachmentDescriptionThe instance to compare to.
Returns
- bool
True if all elements and all array elements are equal; false otherswise.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.