Getting ready

For this recipe, you need to have access to the shader used by the model that you want to alter. Once you have it, we duplicate it so that we can edit it safely. It can be done as follows:

  1. Find the shader your model is using and, once selected, duplicate it by pressing Ctrl + D. If it is just using the Standard Shader, as in this example, it is also possible to just create a new Standard Material such as normal, and the Albedo map will automatically transfer over. Either way, rename this new shader NormalExtrusion.
  2. Duplicate the original material of the model and assign the cloned shader to it.
  3. Assign the new material to your model (NormalExtrusionMat) and start editing it.

In order for this effect to work, your model should ...

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.