Graphics Reference
In-Depth Information
In this chapter, we will learn how to use these techniques together to produce more realistic
real-time rendering results, and then see how to extend the process to implement local
deformations such as footprints or scratch marks.
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 .
In order to improve the preview of the models when using this shader
graph, you can copy the existing phong.dgsl from \Common7\IDE\
Extensions\Microsoft\VsGraphics\Assets\Effects\
located in the Visual Studio installation directory (the default being C:\
Program Files (x86)\Microsoft Visual Studio 11.0
for VS 2012 or C:\Program Files (x86)\Microsoft Visual
Studio 12.0 for VS 2013)
3.
With the shader graph open, click within the dark background so as to unselect any
graph nodes.
 
Search WWH ::




Custom Search