Sign in to follow this  

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

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

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