Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
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::ProcessVerticesmethod accepts its own flags to control lighting calculations during vertex processing.