A compilation of few rasterization techniques using Vulkan API and C++
External Tools/Packages Used
- tinygltf (fork, module)
- NiceMath
- tiny_obj_loader
- ImGui (fork, module)
- ImGuizmo (fork, module)
- Imimgui-filebrowser (fork, module)
Feature Integrated
- Array Of Textures, Non-Uniform Descriptor Indexing and Bindless
- Asynchronous Asset Loading
- Fordward and Deferred Rendering
-
Object Picker
- Challanges Faced: -
- Algorithm Limitations: -
- Bugs:
- Object picking is not accurate in Forward Pass
- Object picking is not correctly implemented in Differed Pass
-
Skybox
- Challanges Faced:
- Algorithm Limitations:
- Bugs:
-
Normal Maps
- Challanges Faced:
- Did not use the correct texture format to store Normals and so computed wrong TBN matrix (used UNORM duh!)
- Algorithm Limitations:
- Bugs:
- Forward pass is also computing lighting in View Space however inverse-transposing the light vector (after multiplying with view materix) is giving incorrect results
- Challanges Faced:
-
SSAO
- Challanges Faced:
- Noise computation was bugy in my previous implementaiton. Now fixed
- Algorithm Limitations:
- Quality of SSAO is not great. Migh want to implement AMD SSAO for comparision
- Bugs:
- Challanges Faced:
-
Shadow Maps (Orthographc Projection and Directonal Light)
- Features:
- Orthographic Shadow Maps implemented
- Implemented PCF - Fixed buggy PCF in Forward
- Used scene's bounding box to perfectly fit the directional light's shaodw camera for best shadow map results
- Reuseing shadow map from previous frame if the scene has not changed
- Challanges Faced:
- Wrong Orthgraphic Matrics were implemented. Ensure there is an implemtation for Right Hand, Zero to One Z value
- Identifying Vulkan Vetex to Pixel pipeline - Z ranges [-1,1] and does not need to be normalised to [0,1]
- X and Y also ranges [-1,1] and did need to be normalised to [0,1] for depth sampling
- Y is inverted in Vulkan, so y = 1.0 - y for sampling the depth map
- Some wrong self shadowing issues related to low Depth Precision - FIXED by increasing precision from 16 bits to 24 bits
- Some other wrong self shadowing issues - FIXED by ensuring shadow is applied to (NdotL < 0)
- Algorithm Limitations:
- Perspective shadow map needs linearization of depth values to work
- High Perspective and Projection Aliasing
- Bugs:
- PCF is not correct in the differed pass
- Peter-Panning effect has not been addressed
- Front face culling in shadow pass is producing buggy results
- PCF Causing HAlo effect aroung intersecting geometry (Eg: Sponza and Suzzane)
- Features:
-
Physically Based Rendering
- Features
- Using Schlick GGX Geometry Shadowing and Geometry Occlusion
- Using Trowbridge-Reitz GGX normal distribution
- Schlick GGX to statistically estiamte light ray occlusion
- Fresnel Schlick Approximation for Fresnel Effect
- Challanges Faced: -
- Algorithm Limitations:
- Not implemented IBL for accuracy
- Only using Lambertian for diffuse computation
- Bugs: -
- Features
-
Gltf loader with stb_image support
- Challanges Faced: -
- Algorithm Limitations: -
- Bugs: -
-
Shader Compilation - GLSL to SPIRV
- Challanges Faced: -
- Algorithm Limitations:
- Currently inspired from Sascha Willems's offline python script using glslangValidator
- Will later move to a runtime glsl compilation process
- Bugs: -
-
Bounding Box Debug Display
- Challanges Faced: -
- Algorithm Limitations:
- Currently generating vertex and indices as 1 complete buffer and rending as single draw call (GPU effecient with some CPU overhead)
- Will later add support for Instanced support for displaying bounding boxes
- Will leter add support to display light type identifiers, cameras and other editor friendly visual tools depending on need
- Bugs: -
-
User Interface and Guizmo Control
- Challanges Faced: -
- Algorithm Limitations:
- Using ImGui and ImGuizmo for UI and transform editting
- Implemented simple participant architecture for willing classes to implement their UI display
- Will keep improving UI as I progress
- Bugs: -