?/TD>
Microsoft DirectX 9.0

dp2add (Pixel Shader)


Performs a 2-D dot product and a scalar addition.

Syntax

dp2add[_sat] dst[.mask], [-]src0[.swizzle], 
                         [-]src1[.swizzle],
                         [-]src2[.replicate_swizzle]

Where:

Remarks

Pixel shader versions1_11_21_31_42_02_x2_sw3_03_sw
dp2addxxxxx

The scalar value for add is chosen by the replicate swizzle on src2.

The following code fragment shows the operations performed.

dest = src0.r * src1.r + src0.g * src1.g + src2.selected_component
// The scalar result is replicated to write mask components

Instruction Information

Minimum operating systemWindows 98


© 2002 Microsoft Corporation. All rights reserved.