Vulkan Initialization & Windowing
As my first major project in Vulkan, I built the entire real-time rendering architecture from scratch. This involved initializing the Vulkan instance with validation layers, configuring window surface integration, selecting physical and logical devices, and managing the swap chain, render passes, and framebuffers. For scene navigation, I implemented an interactive camera system using GLFW’s event-driven callback and input polling framework.
Forward Base Pass & Debug Visualizations
I began with a base-color forward pipeline to verify mesh loading and texture sampling across the scene. To validate geometry and sampling behavior before introducing complex lighting, I built toggleable debug visualization pipelines for inspecting texture mipmap levels, surface normals, fragment depth, and partial depth derivatives (dFdx / dFdy).
Cook-Torrance BRDF & Alpha Masking
To achieve physically plausible materials, I configured uniform buffers and descriptor sets to stream per-frame and per-material data to the shaders. The lighting model implements the Cook-Torrance microfacet BRDF—combining a Beckmann normal distribution function (NDF), Schlick’s Fresnel approximation, and a Lambertian diffuse term. Transparent and alpha-masked geometry is isolated into a dedicated pipeline pass rendered after opaque meshes to preserve correct sorting and blending.
Render-to-Texture Pixelation Filter
I added a render-to-texture post-processing pass that applies a 5 × 3 texel pixelation filter to the final scene output. Implementing this cleanly required explicit pipeline synchronization, using subpass dependencies and image layout transitions to prevent read-after-write hazards between rendering passes.
4-Attachment G-Buffer & Over-Shading Reduction
To eliminate redundant fragment lighting calculations on occluded geometry, I transitioned the engine toward deferred shading. First, I implemented an overdraw and over-shading debug view to profile pixel-shading bottlenecks. I then constructed a multi-target G-buffer render pass with four attachments:
- Attachment 0: Depth
- Attachment 1: Surface Normals
- Attachment 2: Albedo (RGB) + Metalness (A)
- Attachment 3: Emissive (RGB) + Roughness (A)
In the subsequent lighting pass, these packed G-buffer attachments are sampled in screen space so PBR lighting is evaluated strictly once per visible pixel—significantly reducing over-shading and improving total frame lighting times.