Anisotropic Highlight Shader

Originally done by James O'Hare.

Description


This shader gives an anisotropic highlight, similar to the highlights found on brushed metal or hair. The highlight can be blended from anisotropic to blinn based on the blue channel of the specular map.

Supports diffuse, normal, specular and gloss shading with alphatested transparency. Gloss and specular values also apply to the anisotropic highlight.

The highlight can be shifted up or down the surface using the Anisotropic Highlight Offset value.

The direction of the surface for anisotropic highlight is defined using a directional texture like these. These act similarly to tangent space normal maps, defining the direction of the surface. However, they should not be converted to normal maps in Unity.

Usage

 * Anisotropic Direction: Direction of the surface highlight. Follows the same directional values as a tangent space normal map.
 * Specular: The specular level is defined in the red channel of the specular texture. This controls the brightness of the specular highlight.
 * Gloss: The gloss level is defined in the green channel of the specular texture. This controls how sharp (full green) or wide (no green) the specular highlight is. It's best to keep this value non-zero.
 * Anisotropic Mask: The blue channel of the specular texture is used to blend between anisotropic and blinn highlights. Full blue = full anisotropic, no blue = full blinn.
 * Anisotropic Offset: Can be used to push the highlight towards or away from the centre point.