Jump to content
  • Advertisement
Sign in to follow this  

[OpenGL] Ambient Lighting?

This topic is 2844 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

First off, hey everyone! I'm not new to programming, but new to 3D programming. My preferred language is C++, so if you give an example please use that language or one similar in syntax. It'll help a lot. ^_^

Anyway, i've been reading nehe's tutorial on opengl, which is very impressive. I noticed there wasn't a lot about ambient lighting though. Now i know you can set an ambient light source and it will give a general amount of light to every surface, but that's not exactly what i want.

As an example, let's say i have a small island and it has a cave. I want the island to be lit up like day, but the cave to be completely dark once you get so deep into it. How can this be done?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!