TmpShade = DotProduct (TmpVector, lightAngle);if (TmpShade < 0.0f) TmpShade = 0.0f; // Clamp The Value to 0 If Negative
Texture Coordinate = vertex normal (world space) dot Light Angle
Texture coordinate is clamped to 0, 1. it isnt that hard to work out.
finny26: fancy posting a screenshot?
Note: The original article for this code can be found at: http://www.gamedev.net/reference/programming/features/celshading.
that's located at the top of the tutorial. i didnt put it there for fun ya know

This tutorial doesn't actually explain the theory, just the code. WHY it works can be found at the above link.
that might explain a bit too

[edited by - MENTAL on May 22, 2002 2:35:16 PM]