Jump to content

  • Log In with Google      Sign In   
  • Create Account


New lighting model in DirectX 7


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 simon_brown75   Members   -  Reputation: 123

Like
Likes
Like

Posted 03 November 1999 - 09:01 AM

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?

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS