#### Archived

This topic is now archived and is closed to further replies.

# Texture Transformation Matrix

This topic is 5400 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Does anyone knows what the different element of the texture transformation matrix in D3D9 represents? I figured out a few, but what are the rest? ScaleX 12 13 14 21 ScaleY 23 24 TransX TransY 33 34 41 42 43 44 Element 12 and 21 definately affects something. Rotation? Thanks.

##### Share on other sites
When using COUNT3, the entire matrix works just like any other transform matrix.

When using COUNT2 (usual for non-projected textures), the last row and column are ignored, consider the matrix to be smaller.

_11 _12 _13
_21 _22 _23
_31 _32 _33

When using 4x4 matrcies with 3 element vectors the last column is 0,0,0,1, except when doing projection. Now we''re using a 3x3 matrix with 2 element vectors... apply the "we''re not projecting rule".

_11 _12 0.0
_21 _22 0.0
_31 _32 1.0

As with normal transforms, the last row is translation.

0.0 0.0 0.0
0.0 0.0 0.0
_Tu _Tv 1.0

As with normal transforms, the scale goes in the diagonal

_Sx 0.0 0.0
0.0 _Sv 0.0
0.0 0.0 1.0

As with normal transforms, rotations occupy the space above the translations... the same space as scale. We only have one axis to rotate about in 2D

_Ra _Rb 0.0
_Rc _Rd 0.0
0.0 0.0 1.0

_Ra = cos(angle)
_Rb = sin(angle)
_Rc = -sin(angle)
_Rd = cos(angle)

1. 1
2. 2
3. 3
Rutin
23
4. 4
5. 5
khawk
14

• 9
• 11
• 11
• 23
• 11
• ### Forum Statistics

• Total Topics
633653
• Total Posts
3013156
×