Referencing multiple textures in a material

In this recipe, we will create a Visual Shader Graph for use with our models that accepts multiple textures. This is necessary to include multiple textures, such as the diffuse texture and the normal and displacement maps, within the same material.

How to do it…

In order to specify multiple textures for the materials in our models with the Visual Studio graphics content pipeline, we need to implement a new Visual Shader Graph (.dgsl file) that allows the selection of additional textures:

  1. Start by right-clicking on the project and selecting Add \ New Item….
  2. Click on the Graphics node, and then click on Visual Shader Graph (.dgsl). We will name the file MultipleTextures.dgsl.

    Note

    In order to improve the preview ...

Get Direct3D Rendering Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.