Table of Contents

Class TargetBlendState

Namespace
Microsoft.Xna.Framework.Graphics
Assembly
MonoGame.Framework.dll

Defines the blend state for a single render target.

public class TargetBlendState
Inheritance
TargetBlendState
Inherited Members

Properties

AlphaBlendFunction

Gets or Sets the blend function for the alpha component.

public BlendFunction AlphaBlendFunction { get; set; }

Property Value

BlendFunction

Remarks

This property specifies the blending operation that will be used to combine the alpha components of the source and destination pixels. The blend function affects how the final alpha value is calculated.

Exceptions

InvalidOperationException

The exception is thrown if you attempt to change the property after the BlendState has been bound to the graphics device.

AlphaDestinationBlend

Gets or Sets the blend factor for the alpha component of the destination pixel.

public Blend AlphaDestinationBlend { get; set; }

Property Value

Blend

Remarks

This property specifies the blend factor that will be used for the destination alpha component when combining the source and destination pixels. The blend factor affects how the final alpha value is calculated.

Exceptions

InvalidOperationException

The exception is thrown if you attempt to change the property after the BlendState has been bound to the graphics device.

AlphaSourceBlend

Gets or Sets the blend factor for the alpha component of the source pixel.

public Blend AlphaSourceBlend { get; set; }

Property Value

Blend

Remarks

This property specifies the blend factor that will be used for the source alpha component when combining the source and destination pixels. The blend factor affects how the final alpha value is calculated.

Exceptions

InvalidOperationException

The exception is thrown if you attempt to change the property after the BlendState has been bound to the graphics device.

ColorBlendFunction

Gets or Sets the blend function for the color components (red, green, and blue).

public BlendFunction ColorBlendFunction { get; set; }

Property Value

BlendFunction

Remarks

This property specifies the blending operation that will be used to combine the color components (red, green, and blue) of the source and destination pixels. The blend function affects how the final color values are calculated.

Exceptions

InvalidOperationException

The exception is thrown if you attempt to change the property after the BlendState has been bound to the graphics device.

ColorDestinationBlend

Gets or Sets the blend factor for the color components (red, green, and blue) of the destination pixel.

public Blend ColorDestinationBlend { get; set; }

Property Value

Blend

Remarks

This property specifies the blend factor that will be used for the destination color components when combining the source and destination pixels. The blend factor affects how the final color values are calculated.

Exceptions

InvalidOperationException

The exception is thrown if you attempt to change the property after the BlendState has been bound to the graphics device.

ColorSourceBlend

Gets or Sets the blend factor for the color components (red, green, and blue) of the source pixel.

public Blend ColorSourceBlend { get; set; }

Property Value

Blend

Remarks

This property specifies the blend factor that will be used for the source color components when combining the source and destination pixels. The blend factor affects how the final color values are calculated.

Exceptions

InvalidOperationException

The exception is thrown if you attempt to change the property after the BlendState has been bound to the graphics device.

ColorWriteChannels

Gets or Sets a value that determines which color channels to enable for writing to the render target.

public ColorWriteChannels ColorWriteChannels { get; set; }

Property Value

ColorWriteChannels

Remarks

This property controls which color channels (red, green, blue, and alpha) are enabled for writing to the render target during the blending operation. By default, all color channels are enabled for writing.

Exceptions

InvalidOperationException

The exception is thrown if you attempt to change the property after the BlendState has been bound to the graphics device.