Getting ready

Let's start by carrying out the following steps:

  1. Create a new shader and give it a name (SimpleLambert).
  2. Create a new material, give it a name (SimpleLambertMat), and assign the new shader to its shader property.
  3. Then, create a sphere object and place it roughly in the center of the scene and attach the new material to it.
  4. Finally, let's create a directional light to cast some light on our object if one isn't created already.
  5. When your assets have been set up in Unity, you should have a scene that resembles the following screenshot:

Get Unity 2018 Shaders and Effects Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.