Toon shading without shaders?

BlitzMax Modules Forums/MiniB3D/Toon shading without shaders?

Would you care to post the ported code? I could convert it to BMax as well, but if you've already done it...