次の方法で共有


BlendFunction Enumeration

Defines how to combine a source color with the destination color already on the render target for color blending.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public enum BlendFunction

Members

  Member name Description
Add

The result is the destination added to the source.

Result = (Source Color * Source Blend) + (Destination Color * Destination Blend)

Max

The result is the maximum of the source and destination.

Result = max( (Source Color * Source Blend), (Destination Color * Destination Blend) )

Min

The result is the minimum of the source and destination.

Result = min( (Source Color * Source Blend), (Destination Color * Destination Blend) )

ReverseSubtract

The result is the source subtracted from the destination.

Result = (Destination Color * Destination Blend) − (Source Color * Source Blend)

Subtract

The result is the destination subtracted from the source.

Result = (Source Color * Source Blend) − (Destination Color * Destination Blend)

Remarks

The alpha value of a color controls its transparency. Enabling alpha blending with AlphaBlendEnable allows colors, materials, and textures on a surface to be blended with transparency onto another surface.

Alpha blending is determined by the SourceBlend and DestinationBlend properties. With the default BlendFunction, the source pixel times the SourceBlend is added to the destination pixel (the pixel on the back buffer) times the DestinationBlend to produce a color that is a blend of the two pixel colors. The BlendFunction determines the operation used on the outcome of the source blend and destination blend components.

See Also

Reference

BlendFunction
SourceBlend
DestinationBlend
SupportsBlendOperation
AlphaSourceBlend
AlphaDestinationBlend
AlphaBlendOperation
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista