This project is designed around a clean, modular architecture emphasizing the Single Responsibility Principle (SRP). It features a custom Render Graph for automatic pipeline synchronization, advanced GPU-driven rendering techniques, Image-Based Lighting (IBL), and a completely decoupled UI system. The build environment is zero-friction: CMake automatically fetches and compiles all dependencies (GLFW, GLM, Dear ImGui, VMA, stb_image) and assets, requiring only the Vulkan SDK (1.3+).
Vulkan Rendering Engine
A modern, physically-based Vulkan rendering engine built in C++ emphasizing a clean, modular architecture and advanced GPU-driven techniques.
C++
Vulkan 1.3
CMake
ImGui
🚀 Key Features
- Programmable Vertex Pulling: Bypasses the traditional Input Assembler (IA). Vertex and index data are stored in massive global Storage Buffers (SSBOs) and manually fetched in the vertex shader using
gl_VertexIndex, significantly reducing CPU overhead. - Bindless Texturing: Material textures are loaded into a global descriptor array, allowing dynamic runtime indexing without rebinding sets.
- Dynamic Rendering: Eliminates rigid
VkRenderPassandVkFramebufferobjects in favor ofVK_KHR_dynamic_rendering. - Synchronization2: Utilizes the
VK_KHR_synchronization2API for precise, fine-grained pipeline barriers and transitions.
- Render Graph (DAG): Automated resource tracking, barrier generation, and pass dependency management.
- Image-Based Lighting (IBL): Runtime HDR environment loading, BRDF LUT generation, and irradiance/pre-filter map baking.
- Shadows: Cascaded Shadow Maps (CSM) for directional lights and omnidirectional point shadows.
- Post-Processing: Depth Pre-Pass, Deferred Shading, SSAO, Auto-Exposure via luminance histograms, and ACESFilm Tone Mapping.
🏗️ Engine Architecture
The engine is heavily modularized to prevent tight coupling and monolithic classes. It utilizes Builder Patterns (PipelineBuilder, ImageBuilder) to reduce Vulkan boilerplate and integrates the Vulkan Memory Allocator (VMA) for memory management.
- Application: Owns the game loop, window context, user input, and the high-level Scene.
- GP2_Renderer: A pure graphics API backend. It receives a Scene and Camera state per frame and executes Vulkan commands with zero knowledge of game logic.
- UILayer / UIPanels: A self-contained ImGui subsystem. Panels are injected with dependencies allowing them to alter engine state without tightly binding the UI to the rendering logic.
- RenderGraph: Dynamically compiles execution orders and memory barriers based on pass inputs/outputs.
🎮 Controls & UI
- Mouse / WASD: Look and move around the scene.
- Scroll Wheel: Dynamically adjust the Field of View (FOV).
- TAB: Toggle UI Mode (releases the mouse cursor and displays the ImGui control panels).
- ESC: Close the application.
- Camera Settings: Adjust movement speed, FOV, and physical lens properties (Aperture, ISO, Shutter Speed).
- Lighting Controls: Move point lights, change sun direction/intensity, and swap HDR environment maps on the fly.
- Render Graph Timeline: Inspect individual Vulkan resources and view CPU/GPU pass execution timings.
- Debug Views: Toggle Albedo, Normals, Depth, and SSAO via the main menu bar, and monitor VRAM stats.
🗺️ Future Roadmap
- Multi-threaded command buffer generation and asset loading.
- Implementation of compute-based lighting culling.
- Support for BC7/ASTC texture compression.