View Source Code

The classical Deferred and Forward rendering pipelines implemented on my custom engine (OPEngine). They come with features such as Cascaded and Filtered Shadow Mapping, Normal Mapping, multiple point and directional lights, Anti-Aliasing (MSAA and FXAA), hdr and tonemapping, skybox and more.

image-center

Deferred Rendering

For Deferred Rendering the G-buffers structure I chose is the one shown below

placeholder image 1 placeholder image 2 placeholder image 2
From left to right: albedo, view space normals and view space position

Normal Mapping

Normal maps can be turned on and off for both the classical pipelines

placeholder image 1 placeholder image 2
Sponza Atrium wall without vs with Normal Mapping

Tonemapping

For the final rendered images, I chose to apply the gamma correction alongside a simple exposure tonemapping:

{
  // ...
  vec3 mapped = vec3(1.0) - exp(-hdrColor * exposure);

  // gamma correction 
  mapped = pow(mapped, vec3(1.0 / gamma));

  FragColor = vec4(mapped, 1.0);

}
placeholder image 1 placeholder image 2
On the left we have the original image with colors in hdr, while on the right we have the gamma corrected and tonemapped final rendered image