flat vertex lighting code?

Blitz3D Forums/Blitz3D Programming/flat vertex lighting code?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

erm... I'm still working away on my shaKAL shadow library (see in my worklogs... Infact I recently posted a patch for the rotating receivers issue I found. Well anywho, I want to add culling of polygons if there normal doesn't face the light... I played around with some dot3 normal mapping code to creat a simple point light... but my coding was faulty and only seemed to work under certain conditions... (yup... I'm confused)
so my question is:
can someone help me by showing me how to do a simplistic flat shading light as a function... returning the lit polygons as white and the unlit as black... or green and red... you know, something easy to understand.
Well... thanks to anyone that helps :)