Jump to content
  • Advertisement


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


Direct3D - Texture Transformation Matricies

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Would somebody be able to give me some sample code as to how to use Texture Transformation Matricies in Direct3D, obviously to change the texture coordinates effectivly?? Thanks in advance.

Share this post

Link to post
Share on other sites
It really depends on what you want to do. What kind of change do you want to make to your texture coordinates? The code for using texture transforms is pretty much the same as any of the other transforms. You use the same D3DXMATRIX and the same functions to calculate it''s values. The only thing that changes is the first argument to SetTransform.

For example, this matrix will add 0.2 to your texture coordinates.

D3DXMATRIX matTranslate;
D3DXMatrixTranslation( &matTranslate, 0.2f, 0.2f, 0.2f );
m_pd3dDevice->SetTransform( D3DTS_TEXTURE0, &matTranslate );


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!