Microsoft DirectX 8.1 (Visual Basic) |
Applications that use the Microsoft® Direct3D® geometry pipeline can enable or disable lighting calculations. Only vertices that contain a vertex normal are properly lit; vertices with no normal will use a dot product of zero in all lighting computations. Therefore, a vertex that does not use a normal receives no light.
For more information, see Mathematics of Lighting.
Applications enable Direct3D lighting by setting the D3DRS_LIGHTING render state to 1, which is the default setting, and they disable Direct3D lighting by setting the render state to 0.
The lighting render state is entirely independent of lighting computations that can be performed on vertices within a vertex buffer. The Direct3DDevice8.ProcessVertices method accepts its own flags to control lighting calculations during vertex processing.