开发者

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

开发者 https://www.devze.com 2022-12-19 02:51 出处:网络
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

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 tr开发者_如何学JAVAansforming 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 a texture coordinate transform.

  • You could clone the mesh.

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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号