O'Reilly logo

Unity 2018 Shaders and Effects Cookbook by Alan Zucconi, John P. Doran

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

How to do it...

In this recipe, we can start modifying a Standard Surface Shader:

  1. Double-click on the Fur Shader to open it up in your IDE of choice. Once opened, add the following bolded Properties:
Properties {  _Color ("Color", Color) = (1,1,1,1)  _MainTex ("Albedo (RGB)", 2D) = "white" {}  _Glossiness ("Smoothness", Range(0,1)) = 0.5  _Metallic ("Metallic", Range(0,1)) = 0.0  _FurLength ("Fur Length", Range (.0002, 1)) = .25  _Cutoff ("Alpha Cutoff", Range(0,1)) = 0.5 // how "thick"  _CutoffEnd ("Alpha Cutoff end", Range(0,1)) = 0.5 // how thick they are at the end  _EdgeFade ("Edge Fade", Range(0,1)) = 0.4  _Gravity ("Gravity Direction", Vector) = (0,0,1,0)  _GravityStrength ("Gravity Strength", Range(0,1)) = 0.25}
  1. This shader requires you ...

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