PDA

View Full Version : twosided lighting



zed
05-31-2004, 06:13 PM
whats the calculations for doing twosided lighting correctly?
i know its pretty easy but i spent an hour on it and didn't really get anywhere

cheers zed

plasmonster
05-31-2004, 09:56 PM
Well, the gl simply flips the normal and uses the back face material properties; otherwise, the base lighting calculations are the same.

zed
06-01-2004, 08:48 PM
cheers
as they say here in oz, 'to easy!'
another case of me trying to over complicate things

zed
06-02-2004, 08:21 PM
got it working my problem was i had the idea in my head i had to do something with the light direction vector.
when i just needed to find out if the polygon is backfacing from the cameras viewpoint