A Normal Vector and the Direction of Light
A surface normal gives an orientation perpendicular to a local surface. Its relationship to an incident direction can inform simple diffuse shading.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Trace two directions
With a unit normal aligned to a unit light direction, their dot product is one. With a perpendicular direction it is zero. See dot product and angles.
Check direction signs
Different lighting formulas may use vectors pointing toward the light or rays traveling from it. Pick the convention and normalize when the intended value is a cosine. See normalizing vectors.[1]