This project is a Graphics Engine made in OpenGL and C++ from scratch. It explores different graphics techniques such as Deferred Rendering, PBR and SSAO.
The camera can be moved with WASDEQ and rotated moving the mouse. All of this while holding the right mouse button. Orbitting around the (0,0,0) can be achieved by pressing the LEFT ALT button and moving the mouse holding the left button.
The UI consists in:
- Main Menu Bar: From here a brief OpenGL info panel can be seen alongside lights creation.
- Viewport Panel: The scene is rendered to a texture, later passed to ImGui to have it on a window
- Hierarchy Panel: Here all the entities in the scene can be seen, selected and manipulated (transform) in the bottom-right panel named Model
- Renderer Panel: Can choose the render path as well as the current render target (albedo, normals, position, depth)
- Lighting Panel: This panel shows all the lights present in the scene. Also allows editing.
- SSAO Panel: Availability to tweak SSAO parameters, such as radius or intensity, among other ones.
The rendering path can be switched from forward (classic) to deferred, storing the relevant data into a framebuffer and applying a single pass where all the lighting gets calculated together.
Another technique that has been implemented is PBR, which is a shading model that provides a more accurate representation of how light interacts with material depending on its properties. By default each objects follows the PBR pipeline, which allows to select the different textures (Albedo, Normals, Metallic, Roughness and Ambient Occlusion) from the inspector panel.
With the PBR shader selected and all textures applied:

The options related to PBR to edit is the material itself:

- All textures can be changed with the button "Change" or removed with the button "Remove". If "Change" button is clicked, a window with all the textures will be shown in order to pick one.
The shaders used for PBR are:
- If in deferred: Deferred Pass Shader
- If in forward: Forward Pass Shader
In addition to PBR, IBL (Image-Based Lighting) has been implemented. This technique aims to light objects with the surrounding environment, which is known as Skybox.
The skybox drawn looks like this:

With reflections on the objects:

The options for handling the skybox are the following:

- Render Skybox: Defines wether to render the skybox or not. In deferred path saves an extra pass.
- Enable Reflections: Defines wether the objects get affected by the skybox light.
The shaders used are:
- Converting HDR to Cubemap
- Calculate the Irradiance Map
- Generate the prefiltered map
- BRDF calculation
- Skybox Rendering
The last developed technique is SSAO, a post-processing effect that, essentially, defines the points on the geometry that are less prone to receive light.
The effect enabled looks like this:

The options for tweaking this effect are:

- Enabled: Defines if the effect is enabled or not.
- Radius: The zone covered by the occlusion. Higher values will make the effect expand.
- Strength: The intensity of the effect. Higher values will boost SSAO effect.
- Bias: The threshold to apply the occlusion. Higher values will lead to less SSAO.
- Noise Size: Changes the noise size, which allows to randomize a little the effect.
The shaders used are:
Link to the repository here.

