Difficulty |
2 |
Prerequisites |
|
Reading material |
1. Directional vs Omnidirectional
The provided light (omnidirectional) is like a tiny lamp that sends light in all directions. Imagine that you put this lamp "infinitely" far away, like the sun. All light rays will appear to arrive in the same direction.
Below you can compare both types of light:
Omnidirectional |
|
Directional |
Notice that since, in the case of omnidirectional light, all light comes from a single point, shadows "fan out" from this point. Directional light, however, produces shadows that are perfectly parallel.
2. Implementation
Create a
The implementation is very short:
|
|
3. Evaluation
Render the scene below:
|