Lighting State
Microsoft DirectX 9.0 SDK Update (October 2004)

Lighting State


If you do not light with a vertex shader or a pixel shader, you may choose to use the lighting engine in the runtime. The lighting engine requires that the vertex data contains per-vertex normals; vertices without normal data will generate a dot product of zero in all lighting computations. The lighting calculations are covered in more detail in Mathematics of Lighting.

To enable the lighting engine, use:

SetRenderState(D3DRS_LIGHTING, TRUE); 


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.