Partager via


Introduction to Lighting and Materials (Windows Embedded CE 6.0)

1/6/2010

When lighting is enabled, as Microsoft® Direct3D® Mobile rasterizes a scene in the final stage of rendering, it determines the color of each rendered pixel based on a combination of the current material color and the texels in an associated texture map; the diffuse and specular colors at the vertex, if specified; and the color and intensity of light produced by light sources in the scene or the scene's ambient light level. When you use Direct3D Mobile lighting and materials, you allow Direct3D Mobile to handle the details of illumination for you. Advanced users can perform lighting on their own, if desired.

How you work with lighting and materials makes a big difference in the appearance of the rendered scene. Materials define how light reflects off a surface. Direct light and ambient light levels define the light that is reflected. You must use materials to render a scene if lighting is enabled. Lights are not required to render a scene, but details in a scene rendered without light are not visible. At best, rendering an unlit scene results in a silhouette of the objects in the scene. This is not enough detail for most purposes.

See Also

Concepts

Lights