Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

razonic1977

OpenGL OPENGL Lighting

This topic is 5380 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello I''m trying to add diffuse lighting to my terrain render. The problem I''m having its very bright near my light vector but gets dark very quickly. I guess I''m wanting some kind of global diffuse light that does not take the distance from the normal to the light vector into account. Something that acts more like the sun. But not sure how i would do that since from what have read the diffuse lighting is calculated with the angle of the normal and the light vector which changes with distance. Hopefully i have something completely backwards and I''m just missing something. Thanks

Share this post


Link to post
Share on other sites
Advertisement
use an infinite light source.

edit: if you don't want the surface normal to be taken into acount, you should use the ambient component instead of the diffuse one.

[edited by - 666_1337 on March 26, 2004 1:53:13 AM]

Share this post


Link to post
Share on other sites
Diffuse Light is what is shone onto the poly,Ambidient just takes the facing of the Poly''s normal like when in 3dsmax you dont define lights but still get that effect of lighting

When i figured it out i had to re-write my scene and enable BackFaceCulling

Share this post


Link to post
Share on other sites
quote:
Original post by dawid
Ambidient just takes the facing of the Poly''s normal

Ambient lighting is a continuous intensity, irregardless of poly position and facing direction.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!