Project Information

  • Language: C++
  • Graphics API: OpenGL
  • Creation: Summer 2020
  • Source URL: GitHub Page

Lighting Simulations

Created as part of a series of summer projects, this collection of consists of advanced OpenGL lighting implementations created according to the LearnOpenGL website. After acquiring the basics, I then attempted the more advanced lighting techniques which covered topics such as gamma correction, shadow, normal and parallax mapping, deferred shading and PBR (physics-based rendering) along with others. Feel free to browse the created projects in the playlist below.



What Did I Learn?

Among the first advanced OpenGL lighting techniques that I learned included shadow, normal and parallax mapping. While parallax mapping is an interesting technique, its use-case it quite uncommon in contrast to both normal mapping which is used for all textures that are loaded into a scene, and shadow mapping which is used to allow for all objects in a scene to cast shadows. Other important lighting techniques that I learned is bloom, deferred shading and SSAO (screen-space ambient occlusion). All of these techniques utilize framebuffers, one of the fundamental graphics programming techniques when it comes to lighting.

 // create horizontal/vertical framebuffers needed for bloom
 unsigned int colorBuffers[2];
 glGenTextures( 2, colorBuffers );
 for ( unsigned int i = 0; i < 2; i++ )
 {
      glBindTexture( GL_TEXTURE_2D, colorBuffers[i] );
      glFramebufferTexture2D( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + i, GL_TEXTURE_2D, colorBuffers[i], 0 );
 }
As for the final and most important array of techniques that I learned among the advanced lighting section, was PBR. This topic covers both diffuse irradiance and specular IBL (image-based lighting) which are essential in creating realistic lighting effects for objects according to a number of parameters, such as its metalness, roughness and ambience. While normal mapping is important, taking these additional parameters into consideration at render time allows for even more realistic lighting.

Future Projects

Using my newfound knowledge of advanced lighting techniques in OpenGL, I plan to create some interesting scenes, that fully utilize all of the techniques that I have learned thus far. Further, I have my sights set on creating a game engine that incorporates PBR for model loading along with many other features, such as shadow mapping and SSAO.


Feel free to drop a comment below.