Game Development Reference
In-Depth Information
renormalize all of your normals after the transformation stages by
enabling the
D3DRS_NORMALIZENORMALS
render state:
Device->SetRenderState(D3DRS_NORMALIZENORMALS, true);
5.4
Light Sources
Direct3D supports three types of light sources.
Point lights
—This light source has a position in world space and
emits light in all directions.
Figure 5.4: A point light
Directional lights
—This light source has no position but shoots
parallel rays of light in the specified direction.
Figure 5.5: Directional light
Spot lights
—This type of light source is similar to a flashlight; it
has a position and shines light through a conical shape in a particu-
lar direction. The cone is characterized by two angles,
and
. The
angle
describes an inner cone, and
describes the outer cone.
Figure 5.6: A spotlight
Team-Fly
®
Search WWH ::
Custom Search