Unity 2018 Shaders and Effects Cookbook
上QQ阅读APP看书,第一时间看更新

Getting ready

To begin this recipe, first create a new scene by selecting File | New Scene. Then, create a sphere game object by going to GameObject | 3D Objects | Sphere. Double-click on the object in the Hierarchy tab to bring the object into focus in the Scene tab. You will also need to create a new standard Surface Shader file (NormalShader) and material (NormalShaderMat). Once created, set the material to a sphere in the Scene view. This will give us a clean workspace in which we can look at just the normal mapping technique:

You will need a normal map for this recipe, but there is also one in the Unity project included with this book.

An example normal map included with this book's content is shown here:

You can see it for yourself in the Assets |  Chapter 03 Textures folder under normalMapExample.