Skip to main content
GameDev.net gamedev.net
🔒 Locked

Sunlight

Started by redcliffe May 14, 2003 at 6:17 AM 2 replies 700+ views
Original Post
redcliffe
redcliffe
Is there a way in OpenGL to have a light source that shines from one direction sorta like a light source far away(i.e. the sun)? Or do you just have to position a point source as far away as possible? Also could anyone point me to a cross platform(nvidia and ati) compatible per pixel lighting and bumpmapping tutorial? Thanks, David
Brother Bob
Brother Bob
Set the W coordinate of the light position to zero to make it directional.
Ready4Dis
Ready4Dis
Last time I checked... the sun wasn't Directional .


--- Edit ---
By the way, just wanted to clarify that that was for humor, and not to be taken seriously.

[edited by - Ready4Dis on May 14, 2003 8:26:33 AM]
MazyNoc
MazyNoc
that is true, but its big and far away so the best aproximation is in fact directional..

on a sunny day, put 2 sticks into the ground (~10 meters apart, 1-2meters in height), then measure the distance between the base of the stics, and the distance between the top of their shadows... It should be pretty much the same.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.