If you are familiar with Unity 4, you may know that the default shader it provided was based on a lighting model called Lambertian reflectance. This recipe will show you how it is possible to create a shader with a custom lighting model and explains the mathematics involved and implementation. The following diagram shows the same geometry rendered with a Standard Shader (right) and a diffuse Lambert one (left):
Shaders based on Lambertian reflectance are classified as non-photorealistic; no object in the real world really looks like this. However, Lambert Shaders are still often used in low-poly games as they produce a neat contrast between the faces of complex geometries. The lighting model used to calculate the Lambertian reflectance is also very efficient, making it perfect for mobile games.
Unity has already provided us with a lighting...