My personal hobby renderer written in C++ using Vulkan. It is intended as a place for me to implement various graphics techniques in a modern API. The renderer is actively being built with new features.
- Showcase
- Features
- Future Features
- Stretch Goals
- Dependencies
- Model Credits
- Technical Details
- References
Compute Shader Skinning and Animation | |
![]() |
![]() |
![]() |
![]() |
Dynamic Area Lights | |
![]() |
Image Based Lighting and Editor | |
![]() |
![]() |
Post-Processing Stack | |
![]() |
![]() |
|
![]() |
![]() |
- Deferred Rendering
- Albedo, Normal, Metal/Roughness/Ambient Occlusion, and Emission
- Implemented entirely using Vulkan Subpasses: Tiled-based renderer friendly
- Position reconstructed from depth
- Supports transparency/opacity through dithering
- PBR Pipeline
- Frostbite Metallic/Roughness Cook-Torrance BRDF
- Dynamic Area Lights
- Sphere, tube, rectangle lights
- Image-based lighting using environment maps
- Generated offline and loaded as
dds
files
- Generated offline and loaded as
- Compute Shader Mesh Skinning
- Skinning matrix calculations for mesh skeletons are done on the GPU
- Bindless Textures
- Bind up to 4294967295 textures in one draw call depending on your hardware. Limited to 80 to maintain compatibility on macOS
- Asynchronous Model Loading
- Models are loaded on multiple separate threads. Vertex/texture data is created with a dedicated transfer queue (if your GPU has one)
- Multithreaded command buffer generation
- Older APIs such as OpenGL require that GPU work be recorded/submitted from one thread (with workarounds such as shared contexts). I take advantage of Vulkan's exposure of command buffers by using multiple threads to speed up tasks such as loading environment maps
- Post-processing Stack
- Apply a variety of configurable post-processing shaders an arbitrary number of times in any order
- FXAA
- Vignette
- Sharpen
- Film Grain
- Chromatic Aberration
- Multiple selectable tone mapping operators
- Reinhard
- Khronos PBR Neutral
- ACES
- Banding from tone mapping is removed used dithering
- Apply a variety of configurable post-processing shaders an arbitrary number of times in any order
- Tangent Space Normal Mapping
- Tangent vectors are automatically computed by the application using the MikkTSpace standard (assuming the model doesn't already have them)
- ImGUI Integration
- Docking GUI to change renderer settings and load models
- Dynamic Lights #16
- Sphere, tube, and rectangle lights
- Compute Skinning and Skeletal Animation #17
- High Quality Bokeh Depth of Field (physically based)
- Physically Based Bloom
- Volumetric Lighting
- Screen Space Reflections
- Shadow Atlas System
Features I want to implement eventually:
- Tiled Deferred Rendering
- Indirect draw, GPU compute culling
- GTAO
- Temporal Anti-Aliasing
- Ray Tracing
- GLFW - zlib License
- GLM - MIT License
- vk-bootstrap - MIT License
- VulkanMemoryAllocator - MIT License
- ImGUI - MIT License
- ImGuiFileDialog - MIT License
- MikkTSpace
- TinyGLTF - MIT License
- tinyobjloader - MIT License
- SPIRV-Cross - Apache 2.0 License
- dds-ktx - BSD 2-Clause License
- gdx-vfx - Apache 2.0: Not used directly but the post processing shaders are based on the ones from this repo.
- robin-map - MIT License
Offline tools glslc, cmftStudio, and Blender are used.
Included in repo:
Asset | Link | License |
---|---|---|
Damaged Helmet | Github | CC Attribution - Non-commercial |
Models featured in screenshots:
- Apple Vision Pro
- Salty Snack
- Copper Tea Pot
- Crytek Sponza
- Tarisland Arachnida
- Pico Chan
- BMO
- Spartan Armour MKV - Halo Reach
- Metal-Rough Spheres
Uses Vulkan 1.2 (SDK 1.3.283) with only core features. Built using CMake and C++17. Runs on Windows and macOS (MoltenVK).
- https://vulkan-tutorial.com/
- https://vkguide.dev/
- https://www.intel.com/content/www/us/en/developer/articles/training/api-without-secrets-introduction-to-vulkan-part-1.html
- https://learnopengl.com/
- https://kylehalladay.com/blog/tutorial/vulkan/2018/01/28/Textue-Arrays-Vulkan.html
- https://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_notes_v2.pdf
- https://seblagarde.wordpress.com/wp-content/uploads/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf
- https://iquilezles.org/articles/filterableprocedurals/