Share via


Lighting State (Windows Embedded CE 6.0)

1/6/2010

Applications that use the Microsoft® Direct3D® Mobile 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 Lighting Equations.

Applications enable Direct3D Mobile lighting by setting the D3DMRS_LIGHTING render state (see D3DMRENDERSTATETYPE) to TRUE, which is the default setting, and they disable Direct3D Mobile lighting by setting the render state to FALSE.

The lighting render state is entirely independent of lighting computations that can be performed on vertices within a vertex buffer. The IDirect3DMobileDevice::ProcessVertices method accepts its own flags to control lighting calculations during vertex processing.

See Also

Concepts

Render States