Microsoft DirectX 8.0 (C++) |
Loads the first source register added to the product of the two colors in the last two source operand registers.
mad tDest, tSrc0, tSrc1, tSrc2
This instruction performs a multiply-accumulate operation. It takes the last two arguments, multiplies them together, and adds them to the remaining input/source argument, and places that into the result register.
This instruction performs the multiply-add based on the following formula.
tSrc0 + tSrc1 * tSrc2
The following example shows how this instruction might be used.
mad d, s0, s1, s2 ; d = s0 + s1*s2