Anisotropic Highlight Hair Shader In Unity
Hair models are commonly used in games, but Unity’s default URP materials did not achieve my desired results for hair shading. Therefore I put together an Anisotropic Highlight Hair shader to enhance hair rendering in projects.
This shader was put together to enhance the rendering of hair models in Unity URP using Shader Graph.
- Unity 2022.3.16f1LTS
- URP 14.0.9
- Shader Graph 14.0.9
It contains a custom lighting function/subgraph from the Unity project BoatAttack to get main light’s direction and color. It requires an anisotropic direction texture. The render result was done with WillB’s UMA(Unity Multipurpose Avatar System) Hair packs. Here is an example showcasing reflection changes based on light direction:
Textures used for testing:
UMA is a free character creation and modification system and users often leverage material color changes for character modification. Here is a demonstration of hair color change below:
You can download the shader from my Github.