Implementing diffuse shading
Before we start our journey into texture mapping, it is important to understand how diffuse materials work. Certain objects might have a uniform color and smooth surface but are not smooth enough to shine in reflected light. These matte materials are best represented with a Diffuse Shader. While in the real world pure diffuse materials do not exist, Diffuse Shaders are relatively cheap to implement and are largely applied in games with low-poly aesthetics, so they're worth learning about.
There are several ways in which you can create a Diffuse Shader. A quick way is to start with Unity's Standard Surface Shader and edit it to remove any additional texture information.
Getting ready
Before starting this recipe, you should have created a Standard Surface Shader called SimpleDiffuse
. For instructions on creating a Standard Surface Shader, look at the Creating a basic Standard Shader recipe of Chapter 2, Creating Your First Shader, if you...