D3DMBLEND (Windows CE 5.0)

Send Feedback

This enumeration provides values that identify scaling factors for alpha blending operations. These scaling factors are multiplied by either the source or destination pixel values depending on whether the render states D3DMRS_SRCBLEND or D3DMRS_DESTBLEND (see D3DMRENDERSTATETYPE) are specified. For more information, see Alpha Blending.

There is a blending factor B for each color channel r, g, and b and for the alpha channel a. These blending factors are derived from the source, S, and destination, D, pixel values.

typedef enum _D3DMBLEND {  D3DMBLEND_ZERO         = 1,  D3DMBLEND_ONE          = 2,  D3DMBLEND_SRCCOLOR     = 3,  D3DMBLEND_INVSRCCOLOR  = 4,  D3DMBLEND_SRCALPHA     = 5,  D3DMBLEND_INVSRCALPHA  = 6,  D3DMBLEND_DESTALPHA    = 7,  D3DMBLEND_INVDESTALPHA = 8,  D3DMBLEND_DESTCOLOR    = 9,  D3DMBLEND_INVDESTCOLOR = 10,  D3DMBLEND_SRCALPHASAT  = 11,  D3DMBLEND_FORCE_ULONG  = 0x7fffffff,} D3DMBLEND;

Elements

  • D3DMBLEND_ZERO
    Identifies that the scaling factor is 0 for all channels.

    Br = 0
    Bg = 0
    Bb = 0
    Ba = 0
    
  • D3DMBLEND_ONE
    Identifies that the scaling factor is 1 for all channels. This is equivalent to not performing a scaling multiplication at all.

    Br = 1
    Bg = 1
    Bb = 1
    Ba = 1
    
  • D3DMBLEND_SRCCOLOR
    Identifies that the scaling factor is the source pixel value.

    Br = Sr
    Bg = Sg
    Bb = Sb
    Ba = Sa
    
  • D3DMBLEND_INVSRCCOLOR
    Identifies that the scaling factor is 1 minus the source pixel value, for each color channel.

    Br = 1 – Sr
    Bg = 1 – Sg
    Bb = 1 – Sb
    Ba = 1 – Sa
    
  • D3DMBLEND_SRCALPHA
    Identifies that the scaling factor is the source alpha value for all color channels.

    Br = Sa
    Bg = Sa
    Bb = Sa
    Ba = Sa
    
  • D3DMBLEND_INVSRCALPHA
    Identifies that the scaling factor is one minus the source alpha value for all color channels.

    Br = 1 – Sa
    Bg = 1 – Sa
    Bb = 1 – Sa
    Ba = 1 – Sa
    
  • D3DMBLEND_DESTALPHA
    Identifies that the scaling factor is the destination alpha value for all color channels.

    Br = Da
    Bg = Da
    Bb = Da
    Ba = Da
    
  • D3DMBLEND_INVDESTALPHA
    Identifies that the scaling factor is one minus the destination alpha value for all color channels.

    Br = 1 – Da
    Bg = 1 – Da
    Bb = 1 – Da
    Ba = 1 – Da
    
  • D3DMBLEND_DESTCOLOR
    Identifies that the scaling factor is the destination pixel value.

    Br = Dr
    Bg = Dg
    Bb = Db
    Ba = Da
    
  • D3DMBLEND_INVDESTCOLOR
    Identifies that the scaling factor is 1 minus the destination pixel value, for each color channel.

    Br = 1 – Dr
    Bg = 1 – Dg
    Bb = 1 – Db
    Ba = 1 – Da
    
  • D3DMBLEND_SRCALPHASAT
    Identifies that the scaling factor is determined by the following equations.

    Br = min(Sa, 1–Da)
    Bg = min(Sa, 1–Da)
    Bb = min(Sa, 1–Da)
    Ba = 1
    
  • D3DMBLEND_FORCE_ULONG
    Forces the compiler to interpret the enumeration as a ULONG value. This value is not used directly in Direct3D Mobile programming.

Remarks

The Direct3D Mobile blending functions, D3DMBLENDOP_MIN and D3DMBLENDOP_MAX, are not impacted by the above listed blending factors.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: D3dmtypes.h.

See Also

Direct3D Mobile Enumerations | D3DMRENDERSTATETYPE | Alpha Blending

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.