?/TD>
Microsoft DirectX 9.0

m3x2 (Vertex Shader)


Computes the product of a 3-component vector and a 2x3 matrix.

Syntax

m3x2 dst, src0, src1

where

Remarks

Vertex shader versions1_12_02_x2_sw3_03_sw
m3x2xxxxxx

The xy mask is required for the destination register. Negate and swizzle modifiers are allowed for src0 but not for src1.

The following equations show how the instruction operates:

dest.x = (src0.x * src1.x) + (src0.x * src1.y) + (src0.x * src1.z);
dest.y = (src0.y * src1.x) + (src0.y * src1.y) + (src0.y * src1.z);

The input vector is in register src0. The input 3x2 matrix is in register src1 and the next higher register in the same register file, as shown in the following expansion. A 2-D result is produced, leaving the other elements of the destination register (dest.z and dest.w) unaffected.

This operation is commonly used for 2-D transforms. This macro instruction is implemented as a pair of dot products as shown here.

m3x2   r0.xy, r1, c0   which will be expanded to:

dp3   r0.x, r1, c0
dp3   r0.y, r1, c1

This is a macro instruction. Swizzle and negate modifiers are invalid for the src1 register. The dest and src0 register, or any of src1+i registers, cannot be the same.

Instruction Information

Minimum operating systemWindows 98


© 2002 Microsoft Corporation. All rights reserved.