Table of Contents

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

blendEnabled bool

Controls whether blending is enabled for the color attachment.

sourceColorFactor BlendFactor

Controls the source color's influence on the blend result.

destinationColorFactor BlendFactor

Controls the destination color's influence on the blend result.

colorFunction BlendFunction

Controls the function used to combine the source and destination color factors.

sourceAlphaFactor BlendFactor

Controls the source alpha's influence on the blend result.

destinationAlphaFactor BlendFactor

Controls the destination alpha's influence on the blend result.

alphaFunction BlendFunction

Controls 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

blendEnabled bool

Controls whether blending is enabled for the color attachment.

colorWriteMask ColorWriteMask

Controls which components of the color will be written to the framebuffer.

sourceColorFactor BlendFactor

Controls the source color's influence on the blend result.

destinationColorFactor BlendFactor

Controls the destination color's influence on the blend result.

colorFunction BlendFunction

Controls the function used to combine the source and destination color factors.

sourceAlphaFactor BlendFactor

Controls the source alpha's influence on the blend result.

destinationAlphaFactor BlendFactor

Controls the destination alpha's influence on the blend result.

alphaFunction BlendFunction

Controls 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

BlendAttachmentDescription

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

BlendAttachmentDescription

AlphaFunction

Controls the function used to combine the source and destination alpha factors.

public BlendFunction AlphaFunction

Field Value

BlendFunction

BlendEnabled

Controls whether blending is enabled for the color attachment.

public bool BlendEnabled

Field Value

bool

ColorFunction

Controls the function used to combine the source and destination color factors.

public BlendFunction ColorFunction

Field Value

BlendFunction

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

ColorWriteMask?

DestinationAlphaFactor

Controls the destination alpha's influence on the blend result.

public BlendFactor DestinationAlphaFactor

Field Value

BlendFactor

DestinationColorFactor

Controls the destination color's influence on the blend result.

public BlendFactor DestinationColorFactor

Field Value

BlendFactor

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

BlendAttachmentDescription

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

BlendAttachmentDescription

SourceAlphaFactor

Controls the source alpha's influence on the blend result.

public BlendFactor SourceAlphaFactor

Field Value

BlendFactor

SourceColorFactor

Controls the source color's influence on the blend result.

public BlendFactor SourceColorFactor

Field Value

BlendFactor

Methods

Equals(BlendAttachmentDescription)

Element-wise equality.

public bool Equals(BlendAttachmentDescription other)

Parameters

other BlendAttachmentDescription

The 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.