Platform SDK: DirectX

Spotlight Properties

[C++]

The D3DLIGHT7 C++ structure contains three members that are used only by spotlights. These members (dvFalloff, dvTheta, and dvPhi) 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 dvTheta value is the radian angle of the spotlight's inner cone and the dvPhi value is the angle for the outer cone of light. The dvFalloff value controls how light intensity decreases between the outer edge of the inner cone and in the inner edge of the outer cone. Most applications will set dvFalloff 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 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.

[Visual Basic]

The D3DLIGHT7 Visual Basic type 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 in the inner edge of the outer cone. Most applications will 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 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.