Sign in to follow this  
Carnevil_

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

Recommended Posts

Carnevil_    130
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

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