Creating the hair material

In most games, hair is rendered using opacity-mapped planes rather than rendering individual strands. This efficiently gives the impression of multiple strands without the performance cost of the thousands of triangles that would have to be used for each strand.

In the scene, take a look at how the astronaut's hair currently appears:

Creating the hair material
The astronaut's hair with a Standard Shader material

Right now, each lock of hair only renders in one direction.

We can improve this by rendering the back faces of the hair mesh and using a custom lighting model to produce more realistic lighting.

This time, we will use anisotropic lighting. ...

Get Mastering Unity Shaders and Effects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.