Skip to content

MVI Editor UI Overhaul & Virtualized GPU-Driven Shadow Architecture - #3

Merged
TamasPetii merged 83 commits into
mainfrom
dev
Jun 26, 2026
Merged

MVI Editor UI Overhaul & Virtualized GPU-Driven Shadow Architecture#3
TamasPetii merged 83 commits into
mainfrom
dev

Conversation

@TamasPetii

Copy link
Copy Markdown
Owner

Overview

This massive PR introduces two major architectural leaps for the Synapse Engine: a complete ground-up rewrite of the Editor UI utilizing an MVI architecture, and a fully unified, virtualized shadow mapping system for Directional, Spot, and Point lights.

Furthermore, this update brings core engine improvements including Jolt Physics and Taskflow integration, SSAO, Xmake cross-platform builds.


Editor UI Overhaul

The editor has been completely transformed to provide a professional, highly functional workspace. Built around the MVI pattern, the UI is now modular, state-driven, and significantly easier to extend.

Key UI Additions:

  • Scene Hierarchy: Searchable entity tree with visibility toggles and data-oriented parent-child grouping.
  • Performance Profiler: Real-time CPU/GPU metrics, frametime graphs, and granular task timing breakdowns.
  • Interactive Viewport: Main 3D view with simulation controls, transform gizmos, and depth-aware selection outlines.
  • Content Browser & Log: Tabbed dual-pane asset explorer and real-time engine output log.
  • Dynamic Inspector: Edits entity components and exposes real-time global rendering and culling configurations.
  • Integration: Native ImGui Node Editor and FileDialog support for advanced workflows.
Képernyőkép 2026-06-26 102124 *The new Synapse Engine Editor featuring the Content Browser, Hierarchy, Inspector, and Workspaces.*

Virtualized Shadow Map Architecture

This PR completely overhauls how shadows are calculated and rendered. We now utilize a fully virtualized, dynamic shadow atlas. Distant lights are dynamically assigned smaller footprint sizes within the atlas, maximizing texture memory efficiency.

Core Shadow Features:

  • Hybrid Execution: Fully supports both CPU-driven and GPU-driven shadow pipelines. This can be toggled in real-time.
  • Compute Shader Culling: Dedicated compute culling for all light types:
    • Directional Lights: Cascade-based frustum culling.
    • Spot Lights: Cone-based culling.
    • Point Lights: Sphere-based culling.
  • Hierarchical Pipeline: Fully supports the Chunk (Static/Morton) -> Model -> Mesh culling hierarchy, seamlessly integrating with both the Meshlet and Traditional rendering pipelines.
  • Ultimate Batching: The entire system is purely GPU-driven using one large command buffer. All models across all visible lights are rendered simultaneously in a single indirect draw call (opaque only).

Directional Light Shadows

Utilizes a cascaded approach mapped directly into the virtual atlas. Culling efficiently discards geometry outside the cascades before rendering.

Képernyőkép 2026-06-26 102835 Képernyőkép 2026-06-26 102829

Spot & Point Light Shadows

Because Spot and Point lights typically affect a significantly smaller subset of the scene geometry, these pipelines utilize a highly optimized Gather and Radix Sort workflow. Instance data is gathered and sorted before the final draw, ensuring maximum GPU occupancy.

Spot Lights:
Képernyőkép 2026-06-26 103007
Képernyőkép 2026-06-26 103001

Point Lights:
Point lights allocate 3x2 chunks for the cubemap faces, flattened directly into the 2D virtual atlas to avoid cubemap overhead.
Képernyőkép 2026-06-26 102925
Képernyőkép 2026-06-26 102919


Core Engine & Rendering Enhancements

Beyond UI and Shadows, several critical rendering and system features have been implemented:

  • Screen Space Ambient Occlusion (SSAO): Added a dedicated SSAO render pass with configurable settings.
  • Depth-Aware Outline Shader: Implemented robust outline systems for entity selection/highlighting.
  • Physics & Concurrency: Integrated Jolt Physics for robust collision handling and Taskflow for modern task-based multithreading.
  • Visual Debugging: Added comprehensive wireframe visualization for Morton Chunks, AABBs, Spheres, Capsules, and Meshlet colliders.
  • Colliders: Implemented Mesh/Convex colliders along with a StaticMesh schema and serialization system.
  • Work Graphs: Refactored geometry culling render passes to utilize Vulkan Work Graphs.

Build System & CI/CD

  • Xmake Integration: Transitioned the build system to xmake supporting Visual Studio 2026, Linux, and VSCode environments.
  • Linux Readiness: Resolved missing syslinks, include errors (VMA), and fixed character input callbacks specifically for Linux builds.
  • CI Actions: Updated GitHub Actions for robust Windows and Linux engine build validation.

TamasPetii added 30 commits May 28, 2026 08:29
…hunk and Model, Morton Chunk and Model. Implemented Work-Graph based Gpu-driven geometry and shadow dirlight culling shaders.
- Resolved fully inside bit problems
- Implemented render passes for model, mesh culling.
- Implemented radix sorting instance data
- Implemented finalize shaders, where the instance buffer and draw descriptor buffers are finalized for rendering.
- Renderpasses to all shaders
- Scene
- Model
- Material
- Texture
…e mechanics

- Still crashes with new models, animation loaded
- Works fine with binary loading
…ented. Fully gpu driven spot light shadow culling works fine!
@TamasPetii TamasPetii self-assigned this Jun 26, 2026
@TamasPetii
TamasPetii merged commit 04876d6 into main Jun 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant