Skip to content

AaronTian-stack/qhenki-renderer

Repository files navigation

qhenki Vulkan Renderer

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.

Table of Contents

Showcase

Compute Shader Skinning and Animation
spi pico
bmo chief
Dynamic Area Lights
lights
Image Based Lighting and Editor
editor helmet
Post-Processing Stack
demo
applevr
gun teapot

Features

  • 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
  • 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
  • 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

Future Features

  • 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

Stretch Goals

Features I want to implement eventually:

  • Tiled Deferred Rendering
  • Indirect draw, GPU compute culling
  • GTAO
  • Temporal Anti-Aliasing
  • Ray Tracing

Dependencies

Offline tools glslc, cmftStudio, and Blender are used.

Model Credits

Included in repo:

Asset Link License
Damaged Helmet Github CC Attribution - Non-commercial

Models featured in screenshots:

Technical Details

Uses Vulkan 1.2 (SDK 1.3.283) with only core features. Built using CMake and C++17. Runs on Windows and macOS (MoltenVK).

References

About

My C++ Vulkan Renderer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published