Spotlight
Is a point-light which limits light to a subset of the radius of the light.
Think of it as a cone exuding light in a certain direction to a certain degree, anything outside of the cone is still dark.
Smoothing
To add soft edges to a spotlight, you define two cones (cutoff radiuses). One for the light itself, and other which slowly decreases intensity as you approach the cutoff.
We can define this as \( I = \frac{\theta - \lambda}{\epsilon} \) Where:
- \( \theta \) The angle at which the current fragment is incident on the light.
- \( \epsilon \) The difference between the inner and outer cone cutoffs \( \lambda - \phi \).
- \( \phi \) The inner cutoff.
- \( \lambda \) The outer cutoff.