texm3x3 - ps
Microsoft DirectX 9.0 SDK Update (October 2004)

texm3x3 - ps


Performs a 3x3 matrix multiply when used in conjunction with two texm3x3pad instructions.

Syntax

texm3x3 dst, src

where

Remarks

Pixel shader versions1_11_21_31_42_02_x2_sw3_03_sw
texm3x3xx

This instruction is the same as the texm3x3tex instruction, without the texture lookup.

This instruction is used as the final of three instructions representing a 3x3 matrix multiply operation. The 3x3 matrix is comprised of the texture coordinates of the third texture stage, and by the two preceding texture stages. Any texture assigned to any of the three texture stages is ignored.

This instruction must be used with two texm3x3pad instructions. Texture registers must follow the following sequence.

 
tex t(n)                 // Define tn as a standard 3-vector (tn must
                         // be defined in some way before it is used)
texm3x3pad t(m),   t(n)  // where m > n
                         // Perform first row of matrix multiply
texm3x3pad t(m+1), t(n)  // Perform second row of matrix multiply
texm3x3    t(m+2), t(n)  // Perform third row of matrix multiply to get a
                         // 3-vector result

Here is more detail about how the 3x3 multiply is accomplished.

The first texm3x3pad instruction performs the first row of the multiply to find u'.

u' = TextureCoordinates(stage m)UVW * t(n)RGB   

The second texm3x3pad instruction performs the second row of the multiply to find v'.

v' = TextureCoordinates(stage m+1)UVW * t(n)RGB   

The texm3x3tex instruction performs the third row of the multiply to find w'.

w' = TextureCoordinates(stage m+2)UVW * t(n)RGB 

Place the result of the matrix multiply in the destination register.

t(m+2)RGBA = (u', v', w', 1)


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.