PDA

View Full Version : 2 sided lighting



05-31-2003, 10:00 PM
Also how can I make my surfaces to have proper normals on both sides when I only pass one normal for every vertex? Do I have to calculate which vertex normal to use based on the camera's view of the object, or is there an easy way to have openGL do it?

SThomas
06-01-2003, 02:45 PM
when you have two sided lighting enabled, gl negates the normal you specified for the front faces and uses that when lighting the back faces. so basically, it's taken care of automatically.

darren
06-02-2003, 08:01 AM
If i understand what you are trying to do correctly. That is define a normal for each side of a polygon. I was able to accomplish this by using the glCullFace command. Drawing the front of a polygon with one normal, then drawing the back with another. Though I guess this is two passes.
-D