How nhuart/pbr_renderer works
pbr_renderer is a Vulkan forward renderer configured by JSON scenes. The principal workflow is scene selection at the application entry point, scene loading into camera/model/light/effect settings, then rendering to HDR output and tone mapping for display or screenshot capture. The graph preserves documented surface shading, IBL, shadows, AO, volumetrics, and particles. Several renderer implementations are unsampled, so their links are marked unverified rather than presented as observed calls.
Main entry points: renderer.cpp Renderer orchestration · main.cpp Application entry · scene_loader.cpp JSON scene loader · tonemap_pipeline.cpp Tone mapping
Components 17
Application and scenes
- Application entry
main.cpp - Scene settings
src/scene/types.hpp - JSON scene loader
src/scene/scene_loader.cpp
Vulkan foundation
- Vulkan context
src/core/context.cpp - Swapchain and HDR targets
src/core/swapchain.cpp - GPU resource allocation
src/core/resource_allocator.cpp
Surface rendering
- Renderer orchestration
src/renderer/renderer.cpp - glTF model loading
src/renderer/gltf_model_io.cpp - Materials and lighting
src/renderer/renderer_materials.cpp
Render effects
- Shadow maps
src/renderer/shadow_pipeline.cpp - SAO and GTAO
src/renderer/ao_pipeline.hpp - Volumetric rendering
src/renderer/volumetric_pipeline.cpp - Particle simulation
src/renderer/particle_pipeline.cpp
Output
- Tone mapping
src/renderer/tonemap_pipeline.cpp - Screenshot capture
src/renderer/renderer_capture.cpp
Other components
- Scene user
- Filament reference runner
filament/app_runner.cpp
Connections 18
- Scene user → Application entry: selects scene
- Application entry → Renderer orchestration: starts renderer
main.cpp - Application entry → JSON scene loader: loads scene
- JSON scene loader → Scene settings: produces settings
- Renderer orchestration → Scene settings: uses settings
- Renderer orchestration → Vulkan context: uses Vulkan
- Renderer orchestration → Swapchain and HDR targets: renders to targets
- Renderer orchestration → glTF model loading: loads models
- Renderer orchestration → Materials and lighting: draws surfaces
- Renderer orchestration → Shadow maps: renders shadows
- Renderer orchestration → SAO and GTAO: computes occlusion
- Renderer orchestration → Volumetric rendering: renders volumes
- Renderer orchestration → Particle simulation: updates particles
- Renderer orchestration → Tone mapping: tone maps
- Tone mapping → Swapchain and HDR targets: writes display output
- Renderer orchestration → Screenshot capture: captures frame
- Renderer orchestration → GPU resource allocation: allocates resources
- Filament reference runner → Scene user: provides comparisons