DirectX 9: Transform texture of one instance of a loaded mesh, but not others

In DirectX 9 I have a .X file which I've loaded and I draw several copies of it. I need to be able to alter the texture coordinates for each copy (e.g. give each one a different scale). Unfortunately because they're all the same mesh and use the same materials, it seems that transforming the texture for one does the transformation for all of them. Is there a way that I can use to transform the texture of each instance of a loaded mesh individually?

  • You could use atexture coordinate transform.

  • You could clone the mesh.

  • You could use a shader and scale the UVs in the shader.

You'll need toClonethe mesh in question, then adjust its information. This will prevent it from effecting the other Mesh instances.

Tags: textures, directx
What Others Are Reading