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.
A version of this page is also available for
4/8/2010

Vertex normals in Microsoft® Direct3D® Mobile are used for lighting in addition to certain texture attributes such as providing coordinates for a given stage. They are not used for visibility testing. This allows your application to pass vertex normals that are not actually normal to the polygon in order to achieve effects such as rendering flat surfaces that appear to be curved.

Direct3D Mobile accepts vertex normals in two different formats, fixed point and floating point. The format of the vertex normals is specified using the FVF flags.

To correctly compute lighting, Direct3D Mobile must have normalized normals. The application may pass in normal vectors that are already normalized, or the application may opt to have the driver handle normalizing the normals. To enable normalizing normals, the application sets the D3DMRS_NORMALIZENORMALS (see D3DMRENDERSTATETYPE) render state to TRUE; the default value for this render state is FALSE.

The direction element of the D3DMLIGHT structure, applicable only for directional lights, need not be normalized. It must however have a nonzero length.

See Also

Concepts

Transformation