Jump to content
  • Advertisement
Sign in to follow this  
Gogeta70

[OpenGL] Ambient Lighting?

This topic is 2747 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!