Adding a texture to your model using the Standard Shader is incredibly simple, as follows:
- In the Sample Code for this chapter that's provided with this book, you can find the basicCharacter model which, by default, has UV information embedded into it, making it so that when we attach a material, it will draw the texture using that information.
- Create a new Standard Surface Shader called TexturedShader by going to the Project tab and then selecting Create | Shaders | Standard Surface Shader. Once created, you can type in a new name for the shader and then press Enter.
- For organization's sake, open the shader and change the first line to the following:
Shader "CookbookShaders/Chapter03/TexturedShader" {
- This will allow ...