Table of Contents

Struct BlendStateRenderTargetDescription

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

A description of a Blend State for a Render Target, which defines how colors are blended when rendering.

[DataContract]
public struct BlendStateRenderTargetDescription : IEquatable<BlendStateRenderTargetDescription>
Implements
Inherited Members
Extension Methods

Remarks

This structure controls transparency, color mixing, and blend modes for a Render Target. Modify this to achieve effects like alpha blending, additive blending, or custom shader-based blends.

Constructors

BlendStateRenderTargetDescription()

Initializes a new instance of the BlendStateRenderTargetDescription structure with default values.

public BlendStateRenderTargetDescription()

Remarks

The default values are:
  <ul><li>The blending is disabled.</li><li>
      For both Color and Alpha:

      <ul><li><span class="term">Source</span><xref href="Stride.Graphics.Blend.One" data-throw-if-not-resolved="false"></xref></li><li><span class="term">Destination</span><xref href="Stride.Graphics.Blend.Zero" data-throw-if-not-resolved="false"></xref></li><li><span class="term">Compare Function</span><xref href="Stride.Graphics.BlendFunction.Add" data-throw-if-not-resolved="false"></xref> (additive)</li></ul>
    </li><li>All color channels can be written (<xref href="Stride.Graphics.ColorWriteChannels.All" data-throw-if-not-resolved="false"></xref>).</li></ul>
</remarks>

Fields

AlphaBlendFunction

Defines the function used to combine the alpha data sources.

public BlendFunction AlphaBlendFunction

Field Value

BlendFunction
See Also

AlphaDestinationBlend

Specifies the second alpha data source and includes an optional pre-blend operation.

public Blend AlphaDestinationBlend

Field Value

Blend

Remarks

Blend options that end in Color are not allowed.

See Also

AlphaSourceBlend

Specifies the first alpha data source and includes an optional pre-blend operation.

public Blend AlphaSourceBlend

Field Value

Blend

Remarks

Blend options that end in Color are not allowed.

See Also

BlendEnable

A value indicating whether to enable or disable blending.

public bool BlendEnable

Field Value

bool

ColorBlendFunction

Defines the function used to combine the color (RGB) data sources.

public BlendFunction ColorBlendFunction

Field Value

BlendFunction
See Also

ColorDestinationBlend

Specifies the second color (RGB) data source and includes an optional pre-blend operation.

public Blend ColorDestinationBlend

Field Value

Blend
See Also

ColorSourceBlend

Specifies the first color (RGB) data source and includes an optional pre-blend operation.

public Blend ColorSourceBlend

Field Value

Blend
See Also

ColorWriteChannels

A combination of flags that specify which color channels (Red, Green, Blue, Alpha) can be written to the Render Target when blending.

public ColorWriteChannels ColorWriteChannels

Field Value

ColorWriteChannels

Default

A BlendStateRenderTargetDescription structure with default values.

public static readonly BlendStateRenderTargetDescription Default

Field Value

BlendStateRenderTargetDescription

Remarks

The default values are:

  • The blending is disabled.
  • For both Color and Alpha:
    <ul><li><span class="term">Source</span><xref href="Stride.Graphics.Blend.One" data-throw-if-not-resolved="false"></xref></li><li><span class="term">Destination</span><xref href="Stride.Graphics.Blend.Zero" data-throw-if-not-resolved="false"></xref></li><li><span class="term">Compare Function</span><xref href="Stride.Graphics.BlendFunction.Add" data-throw-if-not-resolved="false"></xref> (additive)</li></ul>
    
  • All color channels can be written (All).

DefaultAlphaBlendFunction

Default value for AlphaBlendFunction.

public const BlendFunction DefaultAlphaBlendFunction = Add

Field Value

BlendFunction

DefaultAlphaDestinationBlend

Default value for AlphaDestinationBlend.

public const Blend DefaultAlphaDestinationBlend = Zero

Field Value

Blend

DefaultAlphaSourceBlend

Default value for AlphaSourceBlend.

public const Blend DefaultAlphaSourceBlend = One

Field Value

Blend

DefaultBlendEnable

Default value for BlendEnable.

public const bool DefaultBlendEnable = false

Field Value

bool

DefaultColorBlendFunction

Default value for ColorBlendFunction.

public const BlendFunction DefaultColorBlendFunction = Add

Field Value

BlendFunction

DefaultColorDestinationBlend

Default value for ColorDestinationBlend.

public const Blend DefaultColorDestinationBlend = Zero

Field Value

Blend

DefaultColorSourceBlend

Default value for ColorSourceBlend.

public const Blend DefaultColorSourceBlend = One

Field Value

Blend

DefaultColorWriteChannels

Default value for ColorWriteChannels.

public const ColorWriteChannels DefaultColorWriteChannels = All

Field Value

ColorWriteChannels

Methods

Equals(BlendStateRenderTargetDescription)

Indicates whether the current object is equal to another object of the same type.

public readonly bool Equals(BlendStateRenderTargetDescription other)

Parameters

other BlendStateRenderTargetDescription

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override readonly bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override readonly int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Operators

operator ==(BlendStateRenderTargetDescription, BlendStateRenderTargetDescription)

public static bool operator ==(BlendStateRenderTargetDescription left, BlendStateRenderTargetDescription right)

Parameters

left BlendStateRenderTargetDescription
right BlendStateRenderTargetDescription

Returns

bool

operator !=(BlendStateRenderTargetDescription, BlendStateRenderTargetDescription)

public static bool operator !=(BlendStateRenderTargetDescription left, BlendStateRenderTargetDescription right)

Parameters

left BlendStateRenderTargetDescription
right BlendStateRenderTargetDescription

Returns

bool