Spotlight parameters

In OpenGL you can make a light source to behave as a spotlight by restricting the shape of the light it emits to a cone. If option 'Spotlight' is enabled then there are four additional data entry fields visible and you can set the spotlight parameters:

Spotlight direction

Set the direction where the spotlight points to by entering spherical angle coordinates. Rotation gives the angle in degrees from x-axis and slope gives the angle from x-y plane. The same rules apply to these angles as for direction of a directional light source. The difference is that for a spotlight you specify the direction where the light points at, where as for directional light you specify the direction to the light source.

Cutoff

This is the angle between the axis of the spot cone and a ray along the edge of the cone. The angle of the cone at the apex is twice this value. Values can be in the range [0, 90]. The smaller the value the more focused is the spotlight. No light is emitted outside of the cone.

Exponent

This controls how concentrated the light is. The intensity of the light is highest in the center of the cone. It's attenuated toward the edges of the cone by the cosine of the angle between the direction of the light and the direction from the light to the vertex being lit, raised to the power of the spot exponent. So higher exponent values result in a more focused light source. This floating point value must be in range [0, 128]. The default value is 0, resulting in uniform light distribution.