Rendering Techniques with Vulkan

Masters Coursework

  • Language: C++
  • Libraries: Vulkan 2.2
  • Code Repository:: Available upon request.
Materials Test Ship

We were guided on basic Vulkan setups (from device selection to memory management and synchronization), which allowed us to render models with different materials and textures, as well as experiments on two different shading models. Finally, we implemented deferred shading and post-processing effects. The large amount of boilerplate code required to render the first triangle was the major challenge, since there are so much implicit concepts under the hood (for example, swapchain and descriptor sets) that were not present in OpenGL. However, once the initial setup is done, Vulkan's systematic API felt much more intuitive and easier to use than OpenGL.


Physically Based Rendering (PBR)

Following the Rendering Equation, it is clear that there are four terms in lighting contribution: emission, ambient, diffuse, and specular. We used BRDF to model the amount of reflected light towards the viewer, meaning that the diffuse and specular contribution involves three functions: Fresnel term (F), normal distribution function (D), and geometry masking function (G). We experimented with the choices of these functions to model lighting slightly differently. For example, using the GGX distribution function in place of the Blinn-Phong distribution function.


Deferred Shading

We also implemented the naïve form of deferred shading (no lighting volume). The material/texture data is stored in the G-buffer in an efficient format. They are then sampled in another graphics pipeline as textures and used in the lighting calculation to draw to the presenting surface.