?/TD> |
Microsoft DirectX 9.0 |
Performs a 3x3 matrix multiply when used in conjunction with two texm3x3pad instructions.
Syntax
texm3x3 (Pixel Shader) dest, src
Registers
- dest
- Destination register.
- src
- Input source register.
Remarks
Pixel shader versions 1_1 1_2 1_3 1_4 2_0 2_x 2_sw 3_0 3_sw texm3x3 x x 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)RGBThe second texm3x3pad instruction performs the second row of the multiply to find v'.
v' = TextureCoordinates(stage m+1)UVW * t(n)RGBThe texm3x3tex instruction performs the third row of the multiply to find w'.
w' = TextureCoordinates(stage m+2)UVW * t(n)RGBPlace the result of the matrix multiply in the destination register.
t(m+2)RGBA = (u', v', w', 1)
Instruction Information
Minimum operating systems Windows 98