?/TD>
Microsoft DirectX 9.0

m4x3 (Pixel Shader)


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

Syntax

m4x3 dst, src0, src1

where

Remarks

Pixel shader versions1_11_21_31_42_02_x2_sw3_03_sw
m4x3xxxxx

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

The following code fragment shows the operations performed.

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

The input vector is in register src0. The input 4x3 matrix is in register src1, and the next two higher registers, as shown in the expansion below. A 3-D result is produced, leaving the other element of the destination register (dest.w) unaffected.

This operation is commonly used for transforming a position vector by a matrix that has no projective effect, such as occurs in model-space transformations. This macro instruction is implemented as a set of dot products as shown below.

m4x3   r0.xyz, r1, c0    will be expanded to:

dp4   r0.x, r1, c0
dp4   r0.y, r1, c1
dp4   r0.z, r1, c2

This is a macro instruction. Swizzle and negate modifiers are invalid for the src1 register. The dst and src0 register cannot be the same.

Instruction Information

Minimum operating systemWindows 98


© 2002 Microsoft Corporation. All rights reserved.