Platform SDK: DirectX

CONST_D3DBLEND

The CONST_D3DBLEND enumeration defines the supported blend mode for the D3DRENDERSTATE_DESTBLEND values in the CONST_D3DRENDERSTATETYPE enumeration. In the member descriptions that follow, the RGBA values of the source and destination are indicated with the subscripts s and d.

Enum CONST_D3DBLEND
    D3DBLEND_ZERO            = 1
    D3DBLEND_ONE             = 2
    D3DBLEND_SRCCOLOR        = 3
    D3DBLEND_INVSRCCOLOR     = 4
    D3DBLEND_SRCALPHA        = 5
    D3DBLEND_INVSRCALPHA     = 6
    D3DBLEND_DESTALPHA       = 7
    D3DBLEND_INVDESTALPHA    = 8
    D3DBLEND_DESTCOLOR       = 9
    D3DBLEND_INVDESTCOLOR    = 10
    D3DBLEND_SRCALPHASAT     = 11
    D3DBLEND_BOTHSRCALPHA    = 12
    D3DBLEND_BOTHINVSRCALPHA = 13
End Enum
D3DBLEND_ZERO
Blend factor is (0, 0, 0, 0).
D3DBLEND_ONE
Blend factor is (1, 1, 1, 1).
D3DBLEND_SRCCOLOR
Blend factor is (Rs, Gs, Bs, As).
D3DBLEND_INVSRCCOLOR
Blend factor is (1-Rs, 1-Gs, 1-Bs, 1-As).
D3DBLEND_SRCALPHA
Blend factor is (As, As, As, As).
D3DBLEND_INVSRCALPHA
Blend factor is (1-As, 1-As, 1-As, 1-As).
D3DBLEND_DESTALPHA
Blend factor is (Ad, Ad, Ad, Ad).
D3DBLEND_INVDESTALPHA
Blend factor is (1-Ad, 1-Ad, 1-Ad, 1-Ad).
D3DBLEND_DESTCOLOR
Blend factor is (Rd, Gd, Bd, Ad).
D3DBLEND_INVDESTCOLOR
Blend factor is (1-Rd, 1-Gd, 1-Bd, 1-Ad).
D3DBLEND_SRCALPHASAT
Blend factor is (f, f, f, 1); f = min(As, 1-Ad).
D3DBLEND_BOTHSRCALPHA
Not supported.
D3DBLEND_BOTHINVSRCALPHA
Source blend factor is (1-As, 1-As, 1-As, 1-As), and destination blend factor is (As, As, As, As); the destination blend selection is overridden.

Remarks

D3DBLEND_BOTHSRCALPHA is no longer supported in Direct3D versions for DirectX 6.0 and later. Please explicitly set both D3DBLEND_SRCALPHA and D3DBLEND_INVSRCALPHA separately.