Physically-based Rendering with Image-based Lighting in Vulkan.
The direct lighting term is calculated with Cook-Torrance's Bidirectional Reflective Distribution Function (BRDF). This implementation uses Trowbridge-Reitz GGX Normal Distribution Function, Schlick-Smith GGX Geometry Function, and Schlick Fresnel Function.
The indirect lighting term is approximated with Image-based Lighting.
The diffuse term is pre-computed by calculating an irradiance cube map which stores the light radiated from the surrounding environment.
The specular term also requires the pre-computation of two maps: a BRDF Lookup table and a prefiltered cubemap. The BRDFLUT contains environment BRDF values for different roughness and view angle inputs. The prefiltered cubemap stores the specular contribution from the surrounding environment, with the multiple mipmaps storing this value for increasing values of roughness.
Clone the repository
git clone --recursive https://github.com/rendoir/vulkan.git
Configure the project
cmake -S . -B .build
Build the project
cmake --build .build
Sascha Willems' Vulkan glTF PBR IBL: For the overall vulkan codebase, model loading and PBR with IBL pipelines.
Joey de Vries' OpenGL Tutorial: For the computer graphics theory and shaders.
Alexander Overvoorde's Vulkan Tutorial: For the vulkan API tutorial.