Microsoft DirectX 8.1 (C++) |
Lights and Materials
Lights are used to illuminate objects in a scene. When lighting is enabled, Microsoft® Direct3D® calculates the color of each object vertex 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.
- The color and intensity of light produced by light sources in the scene or the scene's ambient light level.
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.
Additional information is contained in the following topics: