
Unity 5.x Shaders and Effects Cookbook
By :

Before starting 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 not smooth enough to shine on 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 find a large application in games with low-poly aesthetics.
There are several ways in which you can create your own Diffuse shader. A quick way is to start with the Standard Shader in Unity 5 and edit it to remove any texture, similarly to what was previously done in Chapter 1, Creating Your First Shader.
Let's start with our Standard Shader, and apply the following changes:
Remove all the properties except _Color
:
_Color ("Color", Color) = (1,1,1,1)
From the SubShader{}
section, remove the _MainTex
, _Glossiness
, and _Metallic
variables. You should not...
Change the font size
Change margin width
Change background colour