View Full Version : Directional Lights
Is there any way to create a directional light in OpenGL? This is not a point light or a spot light. A directional light has no position, and just calculates light intensity by the light direction and vertex normal. No matter where the polygon is positioned in space, a directional light will light it the same way.
04-10-2005, 07:34 PM
How about a luminosity map? Example (http://http://www.apgsoftware.co.uk/gl/lightmap.html)
04-10-2005, 08:00 PM
Set the w component of the light position to 0 to make it a directional light. This is covered in the red book if you happen to have a copy.
Excellent. The x, y, and z components then become the directional vector.
Thanks, it works perfectly.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.