Render Mesh with Texture using HLSL |
Language: |
This example demonstrates how to render a mesh texture using the high-level shader language (HLSL).
In the following C# code example, the following assumptions are made:
[C#]
effect.SetValue("WorldViewProjection", worldMatrix); // Iterate through each subset and render with its texture for (int m = 0; m < meshTextures.Length; ++m) { effect.SetValue("SceneTexture", meshTextures[m])); effect.CommitChanges(); mesh.DrawSubset(m); }
Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center