Sign in to follow this  

[OpenGL] Ambient Lighting?

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this