Microsoft DirectX 8.0 (C++)

Spotlight Properties

The D3DLIGHT8 C++ structure contains three members that are used only by spotlights. These members—Falloff, Theta, and Phi—control how large or small a spotlight object's inner and outer cones are, and how light decreases between them. For general information about these characteristics, see Spotlights.

The Theta value is the radian angle of the spotlight's inner cone, and the Phi value is the angle for the outer cone of light. The Falloff value controls how light intensity decreases between the outer edge of the inner cone and the inner edge of the outer cone. Most applications set Falloff to 1.0 to create falloff that occurs evenly between the two cones, but you can set other values as needed.

For more information about the mathematical model used by Microsoft® Direct3D® for calculating falloff, see Spotlight Falloff Model.

The following illustration shows the relationship between the values for these members and how they can affect a spotlight's inner and outer cones of light.