Saber Engine (2022 – ongoing)

“Ideally, a Jedi took many months to construct a single perfect weapon that he or she would keep and use for a lifetime. Once you build it, the lightsaber will become your constant companion, your tool, and a ready means of defense.” – Luke Skywalker

Saber Engine is an API-agnostic real-time rendering engine framework that I actively maintain as a personal project.

It offers a modern, flexible, and high-performance multi-threaded architecture, designed for data-driven development and experimentation. This framework serves as a platform for me to deepen my understanding of real-time rendering, computer graphics, and engine architecture.

GitHub Repository: https://github.com/b1skit/SaberEngine

Saber Engine animation test: Multiple skinned meshes, morph targets, & keyframe transform animations. Lit with directional, point, and spot lights, image-based lighting, XeGTAO. Rendered with a deferred pipeline.

Features:

Core Architecture:

  • Multi-threaded architecture implemented in C++20
  • Scriptable rendering pipeline:
    • Graphics systems are implemented using a high-level, API-agnostic abstraction layer & combined through input/output dependencies defined in .json
    • Dynamically generates an optimized, thread-safe render graph at runtime
  • Droid: A custom offline shader compiler & C++ code generation tool
    • Effects/Techniques/DrawStyles are described via .json for dynamic runtime shader resolution
  • GLTF 2.0 format support (cgltf):
    • Supports the KHR_lights_punctual extension with:
      • Directional lights
      • Point lights
      • Spot lights
    • Supports the KHR_materials_emissive_strength extension, allowing configurable emissive intensity
    • Supports the KHR_materials_ior extension for configurable index of refraction values
    • Supports KHR_materials_unlit extension for unlit shading
    • Supports EXT_mesh_gpu_instancing extension for GPU instancing

Rendering Functionality:

  • Rendering API-agnostic: Supports:
    • DirectX 12 (Agility SDK 1.611.2) (default)
    • OpenGL 4.6
    • Upcoming Vulkan support
  • GPU-accelerated ray tracing (DXR)
  • Asynchronous copy/graphics/compute pipelines
  • Supports both bindless and slot-based resource binding models
  • Advanced graphics features:
    • Animation: Skinning, morph targets, & keyframe node/transform animations
    • HDR Physically-Based Lighting Model (based on EA’s Frostbite, Lagarde et al.)
      • Image-based indirect lighting
    • Soft shadows: PCF & PCSS
    • Inline ray traced shadows
    • Radiometrically-correct screen-space ambient occlusion (Intel XeGTAO)
    • Ray traced ambient occlusion (RTAO)
    • Ray differentials for texture & environment map mip level calculations
    • Reference path tracer for ground-truth rendering comparisons
    • ACES filmic response and Reinhard tone mapping
    • Physically-based camera & exposure settings
    • Physically-based emissive lighting & bloom
    • Camera frustum culling
    • GPU instancing
      • Automatically detects & combines instanceable batches into single draw calls

Resource Management:

  • Asynchronous, reference-counted resource loading system:
    • Supports work stealing
  • Indexed buffer management system for automatic instancing and buffer indirection LUT generation
  • Batch pool minimizes draw-call setup costs by reusing draw-call resources

Additional Features:

  • Entity Component System (EnTT)
    • Automatic system update orchestration from component read/write declarations
  • Rigid Body Physics & Collision detection (Jolt)
  • Interactive UI (ImGui):
    • Object picking & inspection
    • Supports drag-&-drop loading of .gltf & .hdr files
  • Dynamic host window resizing with independent render resolution & fullscreen switching
    • Supports VSync/tearing
    • Frame rate limiter controls
  • Screenshot captures
  • Comprehensive debugging tools:
    • Real-time CPU/GPU frame timers
    • Debug views for live inspection of per-stage render targets
    • Support for RenderDoc & PIX programmatic capture APIs
    • NVIDIA Aftermath integration for automatic GPU crash dump generation

Saber Engine is continuously evolving. Additional features are always in development.

Scroll to top