Vertex Color Lighting

Vertices of type D3DVERTEX, D3DLVERTEX, and D3DTLVERTEX cannot contain both color and normal information. Because the default shading mode is Gouraud shading, which depends on both vertex color and normal information, Direct3D did not use vertex color in the lighting calculations.

With the introduction of the flexible vertex format, vertices may contain both vertex color and vertex normal information. By default, Direct3D uses this information when it calculates lighting. If you want your application to disable the use of vertex color lighting information, invoke the IDirect3DDevice3::SetLightState method and pass D3DLIGHTSTATE_COLORVERTEX as the first parameter. Set the second parameter to FALSE to disable vertex color lighting, or TRUE to enable it.

If D3DLIGHTSTATE_COLORVERTEX is set to TRUE and a diffuse vertex color is present, the output alpha is equal to the diffuse alpha for the vertex. Otherwise, output alpha is equal to the alpha component of diffuse material, clamped to the range [0, 255].