Sign in to follow this  

Specifying ambient light

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

Apparently, there are two ways of specifying ambient light: 1) device->SetRenderState (D3DRS_AMBIENT,...) 2) device->SetLight (i,&light) where light has entries light.Ambient.[rgba] My questions, if somebody could clear this for me: a) Are these specifications equivalent? b) If both are specified, are they additive? c) If the second method is used, is light.type of any relevance? (I'm using DIRECTIONAL, just to specify something). Thanks! -amtri

Share this post


Link to post
Share on other sites
First off, yes, lighting is kind of funky that way.

I BELIEVE that they are additive and pretty much equivalent. The SetLight method lets you pass ambient so you can turn on and off the lighting and it appear to automatically update the ambient world whereas the SetRenderState method is just a general ambiance. Directional/Spot/Point all do the same... I BELIEVE.

:D

Hope this helps,
Stephen Timothy Cooney

Share this post


Link to post
Share on other sites

This topic is 3841 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.

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