?/TD> |
Microsoft DirectX 9.0 |
Computes the product of a 3-component vector and a 3x4 matrix.
m3x4 dst, src0, src1 |
---|
where
Pixel shader versions | 1_1 | 1_2 | 1_3 | 1_4 | 2_0 | 2_x | 2_sw | 3_0 | 3_sw |
---|---|---|---|---|---|---|---|---|---|
m3x4 | x | x | x | x | x |
The xyzw (default) 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.x * src1.y) + (src0.x * src1.z); dest.y = (src0.y * src1.x) + (src0.y * src1.y) + (src0.y * src1.z); dest.z = (src0.z * src1.x) + (src0.z * src1.y) + (src0.z * src1.z); dest.w = (src0.w * src1.x) + (src0.w * src1.y) + (src0.w * src1.z);
The input vector is in register src0. The input 3x4 matrix is in register src1, and the next two higher registers, as shown in the expansion below.
This operation is commonly used for transforming a position vector by a matrix that has a projective effect but applies no translation. This macro instruction is implemented as a pair of dot products as shown here.
m3x4 r0.xyzw, r1, c0 will be expanded to: dp3 r0.x, r1, c0 dp3 r0.y, r1, c1 dp3 r0.z, r1, c2 dp3 r0.w, r1, c3
Minimum operating system | Windows 98 |
---|