I know there is a function in D3D that transforms the texture coordinate:
d3dDevice->SetTransform( D3DTS_TEXTURE0, &matrix );
The problem is how I could get the matrix. For example, I now have texture offset, scale, rotation, and brightness. How should I set that matrix?
Transforms. There are links to the D3DX Utility Library methods on that page.