TeamFortress2Shader

Originally done by James O'Hare.

Description


This shader takes a toon ramp image file to use as it's lighting model.

Supports diffuse, normal, specular and gloss shading with alphatested transparency.

It also applies a rim light based on the vertical orientation of the surface normal.

Usage

 * Toon Ramp: Controls the shading of the model from dark to light. This is multiplied by the diffuse texture.
 * Rim Color: Color of the rim light. Alpha channel also controls it's strength.
 * Rim Power: The exponent of the rim lighting. Higher values gives a sharper rim light.
 * 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.
 * Rim Mask: The blue channel of the specular texture is used to control the strength of the rim lighting. Full blue = full rim, no blue = no rim. This can also be controlled globally with the alpha value of the Rim Color.