Extend analytical lights support with KHR_lights_punctual
This is the final recipe in this chapter, and we will add support for analytical light sources to our glTF viewer. In the next chapter, we will cover the KHR_lights_punctual
extension, which will allow us to load lighting information directly from glTF assets. In this recipe, we will only be dealing with shader changes.
In the context of glTF PBR, the terms “analytical” and “punctual” lights are often used interchangeably to describe the same type of light source:
- Analytical light: This refers to light sources defined by mathematical equations, enabling precise calculations of its effect on lighting.
- Punctual light: This describes light sources that are infinitely small points that emit light in specific directions and intensities.
We will explore these concepts in more detail in the next chapter. In this recipe, fFor simplicity, we’ll use both terms interchangeably.