Synapse Engine v2.0.0 - Fully GPU-Driven & Data-Oriented Architecture#1
Merged
Conversation
…ings. - Vcpkg will download all the necessary packages, headers, libs, dlls.
…and storage policies
… on template functions
…t type index manager implemented
…/registry test + CI/CD google test pipeline added
…set, atomic and normal uint8 flags!!!
…n (VK_EXT_shader_object) - Changed vcpkg to be static-md -> To fix shaderc and spriv reflection diamond lib include problems!!!
- BinarySemaphore - TimelineSemaphore - Fence
…ns for pipeline layout
…pu culling shaders
…ojection lod selection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request: Synapse Engine v2.0.0 - Fully GPU-Driven & Data-Oriented Architecture
Overview
This pull request introduces a massive 150-commit rewrite of the Synapse Engine.
The architecture has been completely migrated from a legacy Object-Oriented, CPU-bound model to a strict Data-Oriented Design (DOD) approach.
The rendering backend is now a 100% GPU-driven, bindless Vulkan pipeline utilizing Multi-Draw Indirect (MDI) and Mesh Shaders.
Core Architecture & ECS
Segmented Entity Pool (ECS)
Replaced the legacy ECS with a cache-friendly memory layout that categorizes entities into:
This improves memory locality and significantly reduces cache misses during system iteration.
Dynamic Skipping Optimization
System iterations now track pool states to automatically skip unchanged dynamic components, drastically reducing CPU overhead.
Massive Multithreading (Taskflow)
Integrated Taskflow to fully parallelize the engine loop.
The following operations are now executed asynchronously through a dependency graph:
MVI Editor UI
Implemented a Model-View-Intent (MVI) architecture for the ImGui editor with full support for:
Physics & Dependencies
Integrated Jolt Physics as the physics backend.
Dependency management has been transitioned to vcpkg (manifest mode).
Additional serialization support added with Boost.JSON.
GPU-Driven Rendering Pipeline
Bindless MDI Pipeline
The entire scene dispatch now relies on:
Using:
vkCmdDrawIndirectCountvkCmdDrawMeshTasksIndirectCountEXTDual Pipeline Execution
Meshes can dynamically switch between:
Both can coexist in the same scene.
WBOIT Integration
Implemented Weighted Blended Order-Independent Transparency (WBOIT) for transparent materials.
This guarantees accurate blending without depth sorting.
O(1) Render Submission
The entire complex scene is submitted in exactly 8 draw calls.
Draw calls are strictly categorized by:
Categories:
Global Material Indirection
Introduced a GPU-side Material Lookup Table.
This allows instances sharing the same base mesh to override materials without breaking the batch.
Advanced Culling Systems
2-Phase Compute Culling
Implemented a fully GPU-driven 2-phase culling pipeline.
Phase 1 — Model-Level Culling
Performs:
Using bounding spheres and aabb.
Phase 2 — Mesh-Level Culling
Individual meshes are culled through Indirect Compute Dispatch.
Subgroup Optimizations
Replaced standard atomics with Subgroup Operations in compute shaders.
Used specifically for incrementing Indirect Draw Command instance counters.
Task Shader Culling
Integrated meshlet-level culling directly into the Task Shader stage.
Invisible geometry is rejected before reaching the mesh stage.
Light Culling
Implemented dedicated GPU and CPU-driven culling passes for:
HiZ Map Generation
Rewrote the Hierarchical Z-Buffer generator.
Now safely handles odd-resolution texture edge cases for accurate occlusion culling.
Assets, Dynamic LODs & Animation
Offset-Based Dynamic LODs
Integrated meshoptimizer to generate:
LOD selection is performed dynamically at runtime based on camera distance.
Uses offset descriptors, eliminating unnecessary index buffer duplication.
Vertex Pulling Animation
Rewrote skeletal animation to work without baked bone data in the vertex struct.
Animations now use:
This allows the same vertex shader to process both:
Per-Frame Animated Colliders
The
ColliderProcessornow calculates accurate:for animated models every frame on background threads.
This data is fed into GPU culling passes.
Unified Image Architecture
Created a unified image processing pipeline:
ImageBuilderImageSource(File / Procedural)ImageProcessorSupports:
Tooling, Profiling & Debugging
Vulkan Timestamp Profiler
Built a custom stall-free, N-buffered GPU Timestamp Query profiler.
Integrated with:
Tracks pass-by-pass timings for:
All measured in milliseconds.
Visual Collider Debugging
Added 1-draw-call collider visualization for:
Editor Depth Pass for WBOIT
Added a secondary:
for transparent objects.
This solves the WBOIT depth-write issue and enables:
inside the editor.
Summary
This PR represents a complete next-generation engine architecture overhaul, focused on:
The result is a significantly more scalable, cache-efficient, and high-performance rendering engine.