Struct BlendStateRenderTargetDescription
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
<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
- See Also
AlphaDestinationBlend
Specifies the second alpha data source and includes an optional pre-blend operation.
public Blend AlphaDestinationBlend
Field Value
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
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
ColorBlendFunction
Defines the function used to combine the color (RGB) data sources.
public BlendFunction ColorBlendFunction
Field Value
- See Also
ColorDestinationBlend
Specifies the second color (RGB) data source and includes an optional pre-blend operation.
public Blend ColorDestinationBlend
Field Value
- See Also
ColorSourceBlend
Specifies the first color (RGB) data source and includes an optional pre-blend operation.
public Blend ColorSourceBlend
Field Value
- 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
Default
A BlendStateRenderTargetDescription structure with default values.
public static readonly BlendStateRenderTargetDescription Default
Field Value
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
DefaultAlphaDestinationBlend
Default value for AlphaDestinationBlend.
public const Blend DefaultAlphaDestinationBlend = Zero
Field Value
DefaultAlphaSourceBlend
Default value for AlphaSourceBlend.
public const Blend DefaultAlphaSourceBlend = One
Field Value
DefaultBlendEnable
Default value for BlendEnable.
public const bool DefaultBlendEnable = false
Field Value
DefaultColorBlendFunction
Default value for ColorBlendFunction.
public const BlendFunction DefaultColorBlendFunction = Add
Field Value
DefaultColorDestinationBlend
Default value for ColorDestinationBlend.
public const Blend DefaultColorDestinationBlend = Zero
Field Value
DefaultColorSourceBlend
Default value for ColorSourceBlend.
public const Blend DefaultColorSourceBlend = One
Field Value
DefaultColorWriteChannels
Default value for ColorWriteChannels.
public const ColorWriteChannels DefaultColorWriteChannels = All
Field Value
Methods
Equals(BlendStateRenderTargetDescription)
Indicates whether the current object is equal to another object of the same type.
public readonly bool Equals(BlendStateRenderTargetDescription other)
Parameters
otherBlendStateRenderTargetDescriptionAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override readonly bool Equals(object obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand 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
Returns
operator !=(BlendStateRenderTargetDescription, BlendStateRenderTargetDescription)
public static bool operator !=(BlendStateRenderTargetDescription left, BlendStateRenderTargetDescription right)