XMColorModulate

Blends two colors by multiplying corresponding components together.

Syntax

XMVECTOR XMColorModulate(
         XMVECTOR C1,
         XMVECTOR C2
)  

Parameters

C1
Type: XMVECTOR 

XMVECTOR describing the first color.

C2
Type: XMVECTOR 

XMVECTOR describing the second color.

Return value

Type: XMVECTOR 

Returns an XMVECTOR describing the color resulting from the modulation.

Remarks

The following pseudocode demonstrates the operation of the function.

XMVECTOR colorOut;

colorOut.x = C1.x * C2.x;
colorOut.y = C1.y * C2.y;
colorOut.z = C1.z * C2.z;
colorOut.w = C1.w * C2.w;

return colorOut;  

Requirements

Header: Declared in directxmath.h.