Toon shading without shaders?

BlitzMax Modules Forums/MiniB3D/Toon shading without shaders?

Note: that's Blitz3D code.