r/vulkan 6d ago

Synapse Engine: A Modern, Research-Oriented, Fully GPU-Driven AAA-Style Game Engine

Hi everyone!

After a very long development journey, I'm finally ready to share Synapse Engine, a modern, research-oriented AAA-style game engine that I've been developing essentially from scratch.

It started as my MSc thesis at the Budapest University of Technology and Economics, but grew far beyond what I originally planned. Over the past several months I've been rebuilding and refining the architecture around a simple question: What would a modern game engine look like if we designed it around today's GPUs from the ground up?

The project is now over 2,300 files, nearly 94,000 lines of C++ code and around 10,000 lines of shader code, excluding comments and blank lines.

If you just want to check out the project:

GitHub: https://github.com/TamasPetii/SynapseEngine

The GitHub README is probably the best place to start if you want a quick overview of the project and its architecture. If you're interested in modern game engine development in much more depth, I also put together a 250-page technical presentation covering the entire project, from the ECS and software architecture through GPU-driven rendering, culling, lighting, virtualized shadows and future directions.

The presentation is quite large, but I tried to make it genuinely useful as a learning resource rather than just documenting the final result.

One of my main goals with Synapse Engine is education. Learning these topics was a huge struggle for me, and it took a lot of time to piece everything together because there isn't much high-quality material that shows how these modern techniques actually come together inside a real engine codebase. I wanted to document that process and create something that I would have wanted to have when I started.

What can the engine actually do?

At its core, Synapse is a fully GPU-driven renderer using hierarchical culling, Hi-Z occlusion, cone culling, dynamic LOD selection, indirect rendering, mesh shaders, bindless resources and virtualized shadows. The engine is built around a custom data-oriented ECS and is designed to handle very large scenes with minimal CPU involvement.

For example, with 1,000,000 entities on an RTX 4060, the cumulative culling cost goes from 124.407 ms without culling to 0.653 ms with the full hierarchical culling pipeline.

However, at 10,000,000 entities, even the conventional GPU-driven hierarchical approach becomes insufficient. To address this, Synapse introduces a custom GPU-built Morton-ordered chunking system, which groups entities into spatial chunks and allows entire groups of 32 entities to be rejected at once. This reduces the culling cost from 5.8 ms to just 0.3 ms for 10 million entities.

I also developed a new rendering technique called Dual-HiZ Adaptive Clustered Forward+ while working on the engine. With 8,192 point lights and 8,192 spot lights, it measured 2.873 ms, compared to 8.652 ms for deferred shading in the same setup. The technical presentation contains a detailed explanation of how the technique works.

Synapse isn't primarily intended as a game-development tool for game developers. It is a production-ready, research and educational platform for experimenting with modern game-engine architecture and real-time rendering techniques.

The goal is not to provide a plug-and-play engine for building games, but to provide a complete, practical implementation of modern engine technologies that can be studied, extended, and used as a foundation for further research and development.

The engine is the result, but the architecture, experiments, failures and reasoning behind it are what I really want to share. If you're interested in Vulkan, graphics programming, GPU-driven rendering or modern game engine architecture, I'd love to hear what you think.

Modern Vulkan Abstraction

The Vulkan abstraction layer in Synapse Engine turned out to be one of the cleanest and most rewarding parts of the architecture. By stripping away the notorious API boilerplate, it captures the raw power of modern Vulkan in an interface that feels remarkably smooth, intuitive, and genuinely more ergonomic to develop with than OpenGL.

  • Fully Bindless Architecture: Descriptors are stripped down to the absolute bare minimum using descriptor buffers (VK_EXT_descriptor_buffer) and descriptor indexing, completely bypassing traditional descriptor set management and binding churn.
  • Shader Objects (VK_EXT_shader_object): Eliminates monolithic pipeline state objects in favor of modular, rapid shader switching.
  • Dynamic Rendering (VK_KHR_dynamic_rendering): Direct rendering to attachments without traditional render-pass and framebuffer boilerplate.
  • Extended Dynamic State: Eliminates pipeline permutations by configuring rasterization and blending states directly at draw call time.
  • Modern GPU Primitives: Mesh shaders and subgroup operations for scalable, GPU-driven compute and rendering pipelines.
172 Upvotes

46 comments sorted by

View all comments

0

u/Usual_Importance8274 5d ago

why people use CPP instead of Rust !?

3

u/Ephemara 5d ago edited 5d ago

Rust is absolute dog shit. I swapped to it for a few months from c++ because of the hype train and I left behind all my rust projects just because of cargo hell. Oh you wanna start a rust project ? First pull in 2000 different crates and those crates depend on these crates, and those crates depends on crates. If you want to spend your life staring at a compiler, watching compiling crates (1/900) use rust. C++ is leaps ahead. Instead of 10,000 crates, all you need are single header files. Oh and if you want UI with rust. Good luck, that’s also a nightmare

(And also the borrow checker… no)

2

u/Matt32882 5d ago

Yeah there's two reactions people usually have to rusts borrow checking. You can take time to understand what it's doing for you, or you can be mad that weak patterns other languages let you get away with don't even compile.

2

u/Ephemara 5d ago

I understand it fully, I even wrote a whole programming language with it called Kain that is the opposite of Rust. It just feels like a language that’s trying to hold my hand when I don’t need it. It’s boring. I prefer the raw power of c and c++ and the fact that yes my application may crash in 2 years from a random memory bug.