• Advertisement

Archived

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

New lighting model in DirectX 7

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

I know I've posted message similar to this before, but i'm still stuck. The problem i'm having is with a point light source in Immediate Mode.
The formula to work out attenuation was changed for DirectX 7 and all my old lighting values don't work anymore. I used to set the three attenuation members of the D3DLIGHT2 struct to 0.0, 1.0 and 0.0 respectively. If I use the same values for the D3DLIGHT7 struct I get about a 99% reduction in the lighting level as compared to the DirectX 6 version.
All the examples in the SDK use lights that don't attenuate at all, they just set the constant component (dvAttenuation0) to 1.0 and have constant lighting. dvAttenuation1 should be the linear lighting component, used for setting lights that fade over distance, but I have to set really tiny values like 0.005 to get any lighting at all. Can anyone offer any illumination?

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement