flat vertex lighting code?

Blitz3D Forums/Blitz3D Programming/flat vertex lighting code?

Kalisme(Posted 2006) [#1]
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 :)


b32(Posted 2006) [#2]
I did came across this:
http://www.gameworld.com.ua/forum/showthread.php?t=41
It's a russian page, you have to scroll down and search for the 'vertex lighting' example.