Jump to content
  • Advertisement
Sign in to follow this  
Carnevil_

Possible to use vertex-based lighting w/ lighting enabled?

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

Is it possible to use vertex-based diffuse lighting (an FVF using D3DFVF_DIFFUSE) while lighting is enabled? I've played around with several examples and settings, but no matter what I do, I can't get it to work. The systems don't seem compatible, but I'd like to know for sure before I abandon vertex-based lighting. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
D3DRS_LIGHTING, true (obviously)
D3DRS_COLORVERTEX, true (MAY use vertex colors)
D3DRS_DIFFUSEMATERIALCOLORSOURCE, D3DMCS_COLOR1 (use diffuse vertex color)

There are also ambient, emissive, and specular material sources. They can be material, color1(vertex diffuse), or color2(vertex specular)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!