typedef enum _D3DTEXTUREBLEND {
D3DTBLEND_DECAL = 1,
D3DTBLEND_MODULATE = 2,
D3DTBLEND_DECALALPHA = 3,
D3DTBLEND_MODULATEALPHA = 4,
D3DTBLEND_DECALMASK = 5,
D3DTBLEND_MODULATEMASK = 6,
D3DTBLEND_COPY = 7,
} D3DTEXTUREBLEND;
Defines the supported texture-blending modes. This enumerated type is used by the D3DRENDERSTATE_TEXTUREMAPBLEND render state in the D3DRENDERSTATETYPE enumerated type.
Decal texture-blending mode is supported. In this mode, the RGB and alpha values of the texture replace the colors that would have been used with no texturing.
Modulate texture-blending mode is supported. In this mode, the RGB values of the texture are multiplied with the RGB values that would have been used with no texturing. Any alpha values in the texture replace the alpha values in the colors that would have been used with no texturing.
Decal-alpha texture-blending mode is supported. In this mode, the RGB and alpha values of the texture are blended with the colors that would have been used with no texturing, according to the following formula:
In this formula, C stands for color, A for alpha, t for texture, and o for original object (before blending).
In the D3DTBLEND_DECALALPHA mode, any alpha values in the texture replace the alpha values in the colors that would have been used with no texturing.
Modulate-alpha texture-blending mode is supported. In this mode, the RGB values of the texture are multiplied with the RGB values that would have been used with no texturing, and the alpha values of the texture are multiplied with the alpha values that would have been used with no texturing.
Decal-mask texture-blending mode is supported.
Modulate-mask texture-blending mode is supported.
Copy texture-blending mode is supported.
Modulation combines the effects of lighting and texturing. Because colors are specified as values between and including 0 and 1, modulating (multiplying) the texture and pre-existing colors together typically produces colors that are less bright than either source. The brightness of a color component is undiminished when one of the sources for that component is white (1). The simplest way to ensure that the colors of a texture do not change when the texture is applied to an object is to ensure that the object is white (1,1,1).