View Full Version : 2 sided lighting
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?
06-01-2003, 03: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.
06-02-2003, 09: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.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.