OpenGL
This is a learning project which I am developing to deepen my understanding of what happens in the background of a game engine.
Lights
​
In this project, I have incorporated three distinct types of lighting
Directional Light: This serves as the primary light for the scene and illuminates everything. It doesn't require a position because it's akin to a universal source, much like the sun.
Point Light: Positioned within the world, a Point Light is more localized. Unlike the directional light, it has a specific position but lacks direction. It also diminishes in strength over distance. To draw a parallel, if the directional light is like the sun, the Point Light is more akin to a smaller, localized light source.
Spot Light: This is essentially a Point Light with an added feature. It possesses direction, much like the directional light, enabling it to mimic real-world flashlights. Refer to the above image for clarity.
SkyBox
To enhance the scene and eliminate the previously empty space, I've incorporated a skybox. The skybox is essentially a 1x1x1 cube surrounding the camera. After rendering the skybox, all other 3D assets are displayed on top of it. During the skybox rendering, the camera's position or translation is disregarded, and only its rotation is considered. This approach ensures that we cannot venture outside the confines of the cube within which the camera is enclosed.