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

Started by
1 comment, last by Carnevil_ 16 years, 1 month ago
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!
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)
Great, that worked! Thanks!

This topic is closed to new replies.

Advertisement