O'Reilly logo

Mastering Unity Shaders and Effects by Jamie Dean

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the skin shader

Moving beyond the purely surface qualities of the model, we need to use a representation of the relative thickness of the model to properly define the subsurface scattering effect. We can calculate the thickness within a shader and then use it to define where the effect is visible.

We will start by creating a new shader:

  1. In the Project panel, click on the PACKT_Shaders folder to view its contents in the Assets panel.
  2. In an empty part of the Assets panel, create a new shader like we have done before. Right-click and choose Create | Shader | Standard Surface Shader from the drop-down list.
  3. In the Assets panel, rename the shader SSS_Skin.
  4. Double-click on the shader to open it in MonoDevelop.
  5. In MonoDevelop, rename the shader as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required