UMEGINE 0.0.1
Loading...
Searching...
No Matches
UMEGINE — DirectX 11 3D Game Engine

A custom 3D game engine built from scratch using C++20 and DirectX 11. This project demonstrates practical understanding of low-level graphics API, engine architecture patterns, and modern C++ development practices.

This is a learning-focused project aimed at understanding the internals of game engine development, not a production-ready engine.

🎯 Current Features

Graphics & Rendering

  • DirectX 11 Renderer: Custom abstraction layer (RHI) over D3D11 API
  • Lighting System:
    • Directional lights with configurable intensity and color
    • Point lights with distance-based attenuation (up to 16 lights per scene)
    • Shadow mapping for directional lights with PCF (Percentage Closer Filtering)
  • PBR Material System:
    • Cook-Torrance GGX BRDF (metallic workflow)
    • Per-pixel metallic/roughness textures from glTF
    • Normal mapping support
    • Ambient occlusion maps with configurable strength
    • Emissive maps with emissive factor
    • Alpha blending (two-pass: opaque front-to-back, transparent back-to-front)
    • Alpha cutout rendering for foliage/vegetation
  • Environment Rendering:
    • Skybox rendering with HDR cubemap support
    • Image-Based Lighting (IBL) with split-sum approximation (irradiance + prefiltered radiance)
    • Analytical EnvBRDF approximation (no LUT texture needed)
  • Post-Processing:
    • Offscreen HDR render target (R16G16B16A16_FLOAT)
    • Reinhard tone mapping (luminance-based)
    • Fullscreen quad pass to backbuffer
  • Asset Loading:
    • glTF 2.0 model loading via tinygltf
    • DDS texture loading via DirectXTex
    • Automatic tangent generation for normal maps

Editor

  • ImGui-based editor integrated through RHI abstraction (API-agnostic)
  • Scene Hierarchy panel with entity list from ECS registry
  • Inspector panel with real-time transform editing (DragFloat3 for position)
  • Game/Editor mode toggle (Insert key) with cursor lock/unlock
  • Input separation: editor and game input are fully isolated when editor is active

Architecture

  • RHI (Rendering Hardware Interface): Abstraction layer separating engine logic from DirectX 11 specifics
  • ECS (Entity-Component-System): Using EnTT for data-oriented design and entity management
  • Scene Graph: Parent-child transform hierarchies with cached world matrices
  • Resource Management: Centralized resource manager with asset caching
  • Virtual File System: Custom VFS for asset path resolution

Core Systems

  • Event System: Observer pattern for engine-wide event handling (window resize, input, etc.)
  • Input Management: Keyboard and mouse input abstraction
  • Logging: Custom logger with severity levels
  • High-Precision Timer: Delta time calculation for frame-independent logic

🛠 Tech Stack

  • Language: C++20
  • Graphics API: DirectX 11 (D3D11), HLSL Shader Model 5.0
  • Build System: CMake 3.20+
  • Dependencies:
    • EnTT: Entity-Component-System library
    • tinygltf: glTF 2.0 model loader
    • DirectXTex: Texture loading and DDS format support
    • DirectXMath: SIMD-optimized math library
    • SDL3: Window and input handling
    • Dear ImGui: Editor UI (with SDL3 + DX11 backends)
    • nlohmann_json: JSON parsing

📁 Project Structure

UMEGINE/
├── UMEGINE/ # Core engine library
│ └── Source/
│ ├── RHI/ # Rendering Hardware Interface (D3D11 abstraction)
│ ├── Graphics/ # High-level rendering (Renderer, Camera, Materials, Mesh)
│ ├── Scene/ # ECS components and scene management
│ ├── Core/ # Engine core (events, logging, filesystem, time)
│ ├── Editor/ # ImGui-based editor (hierarchy, inspector)
│ ├── Resources/ # Asset management
│ └── Utils/ # Math utilities (DirectXMath wrappers)
└── Elysia/ # Sandbox application for testing
└── Resources/ # Shaders (HLSL) and test assets

🚧 Known Limitations

  • Frustum culling is basic (AABB-based)
  • No level-of-detail (LOD) system
  • No occlusion culling
  • Single-threaded rendering
  • No deferred rendering
  • Limited to DirectX 11 (no Vulkan/Metal support)
  • Shadow mapping limited to single directional light (no cascades)

🎓 Learning Goals

This project serves as a deep dive into:

  • Low-level graphics API usage (resource management, pipeline state, shader compilation)
  • Modern engine architecture patterns (ECS, RHI abstraction, component-based design)
  • HLSL shader programming (vertex/pixel shaders, constant buffers, shadow mapping)
  • C++20 features and best practices
  • Build system configuration (CMake, vcpkg)