# invertedgames-dev/rtxgi-ue-5.7-plugin architecture

> Architecture diagram of the GitHub repository invertedgames-dev/rtxgi-ue-5.7-plugin, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/invertedgames-dev/rtxgi-ue-5.7-plugin
- Repository: https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin

## Overview

1. This repository is an Unreal Engine plugin for RTXGI, organized as two UE modules plus a shader set. The runtime module is `RTXGI`, the editor module is `RTXGIEditor`, and the GPU work lives in `/Shaders/Private` with shared `.ush` SDK headers.

2. The top-level plugin descriptor `RTXGI.uplugin` wires the modules into Unreal’s plugin system. The README makes the main boundary explicit: the plugin only works as a dynamic GI solution when UE is using DirectX 12 with ray tracing enabled, and it falls back to static probe data when ray tracing is unavailable.

3. The runtime module centers on the `DDGIVolume` feature. `DDGIVolume` is the in-world actor, `DDGIVolumeComponent` exposes runtime and Blueprint-accessible controls, and the surrounding runtime code manages lifecycle, settings, serialization, scheduling, and rendering integration.

4. Probe management is the core data flow. A placed volume defines a 3D probe grid; the system updates probe irradiance and distance data over time, stores that data in textures/buffers, and uses it later during lighting application. Volumes are updated in a weighted round-robin manner, with per-volume update priority and a project-level probe ray budget limiting cost.

5. The GPU pipeline is split into discrete shader passes. The `ProbeUpdateRGS.usf` and `ProbeViewRGS.usf` ray-generation shaders handle ray-traced probe updates and visualization, while compute shaders such as `ProbeRelocationCS.usf`, `ProbeStateClassifierCS.usf`, `ProbeBorderUpdateCS.usf`, and `ProbeBlendingCS.usf` implement relocation, classification, edge handling, and temporal blending. `ApplyLightingDeferred.usf` and `UpscaleLighting.usf` connect probe results back into UE’s lighting path.

6. The shader SDK under `Shaders/Private/SDK` provides shared definitions and data layouts used across passes. Files like `DDGIVolumeDefines.ush`, `DDGIVolumeDescGPU.ush`, and `ddgi/ProbeCommon.ush` act as the contract between C++ volume state and HLSL kernels.

7. The runtime C++ side is responsible for preparing GPU-visible volume descriptions and orchestrating updates. Files such as `DDGIVolumeDescGPU.h`, `DDGIVolumeUpdate.cpp`, `DDGIUtilities.cpp`, and `DDGIVolumeVisualize.cpp` indicate a clear split between CPU-side volume state, update scheduling, and debug/visualization support.

8. `RTXGIPlugin.cpp` and `RTXGIPluginSettings.cpp` define the plugin’s integration and configuration surface. The project settings exposed in UE control probe storage formats, visualization defaults, serialization, and performance limits; cvars like `r.RTXGI.DDGI` and `r.RTXGI.DDGI.LightingPass.Scale` act as runtime switches for the render path.

9. `RTXGIEditor` is a thin editor-only layer. Its main job is to customize how RTXGI content appears in the Unreal editor, especially via `RTXGIDetails.cpp`, which likely extends the details panel for `DDGIVolume` actors and components so artists can tune GI behavior without touching code.

10. The main user-facing workflow is: enable the plugin, place one or more `DDGIVolume` actors, configure volume and probe settings, and let the runtime choose which volume to update and which volume contributes lighting in the camera frustum. Blueprint access goes through `DDGIVolumeComponent`, which means runtime gameplay logic can manipulate the GI system without directly talking to render internals.

11. There are two important runtime modes. In DXR-capable environments, probes update dynamically via ray tracing; without ray tracing, the plugin loads previously serialized probe data and behaves statically. That makes persistence/serialization part of the architecture, not just a convenience feature.

12. The repo’s main architectural boundary is between UE gameplay/editor objects and the render pipeline. On one side are actors, components, project settings, Blueprint calls, and editor customization; on the other are GPU passes, ray-tracing shaders, probe textures, and deferred lighting integration. The plugin exists to translate between those domains.

13. If you’re drawing the system, the most important external dependencies are Unreal Engine itself, the DirectX 12/DXR runtime, and the GPU driver/hardware stack. Everything else in the repo is in service of plugging DDGI probe simulation into UE’s rendering and authoring workflow.

Main entry points: [`Source/RTXGI/Private/DDGIVolumeUpdate.cpp`](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/DDGIVolumeUpdate.cpp) (Volume update), [`Shaders/Private/SDK/Common.ush`](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/SDK/Common.ush) (Shader SDK), [`Source/RTXGI/Private/RTXGIPlugin.cpp`](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/RTXGIPlugin.cpp) (RTXGI plugin), [`Source/RTXGI/Private/DDGIVolume.cpp`](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/DDGIVolume.cpp) (DDGIVolume)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_plugin["Plugin boundary"]
  node_uplugin["RTXGI.uplugin<br/>plugin descriptor<br/>[RTXGI.uplugin]"]
  node_readme["README<br/>docs<br/>[README.md]"]
end

subgraph group_runtime["Runtime module"]
  node_plugin_runtime["RTXGI plugin<br/>runtime integration<br/>[RTXGIPlugin.cpp]"]
  node_plugin_settings["Plugin settings<br/>config surface"]
  node_volume_actor["DDGIVolume<br/>world actor<br/>[DDGIVolume.cpp]"]
  node_volume_component["Volume component<br/>Blueprint component"]
  node_volume_update["Volume update<br/>scheduling"]
  node_volume_desc_gpu[("GPU desc<br/>data bridge")]
  node_ddgi_utils["Utilities<br/>helpers<br/>[DDGIUtilities.cpp]"]
  node_volume_visualize["Visualize DDGI<br/>debug rendering"]
end

subgraph group_editor["Editor module"]
  node_editor_main["RTXGIEditor<br/>editor module<br/>[RTXGIEditor.cpp]"]
  node_details_panel["RTXGI details<br/>editor customization<br/>[RTXGIDetails.cpp]"]
end

subgraph group_shaders["Shader pipeline"]
  node_probe_update_rgs{{"Probe update<br/>ray-gen shader<br/>[ProbeUpdateRGS.usf]"}}
  node_probe_view_rgs{{"Probe view<br/>ray-gen shader<br/>[ProbeViewRGS.usf]"}}
  node_relocation_cs{{"Relocation<br/>compute shader"}}
  node_classifier_cs{{"Classifier<br/>compute shader"}}
  node_border_cs{{"Border update<br/>compute shader"}}
  node_blending_cs{{"Probe blending<br/>compute shader"}}
  node_apply_lighting{{"Apply lighting<br/>deferred shader"}}
  node_upscale_lighting{{"Upscale lighting<br/>compute shader"}}
  node_shader_sdk["Shader SDK<br/>shared headers<br/>[Common.ush]"]
end

node_uplugin -->|"loads"| node_plugin_runtime
node_uplugin -->|"loads"| node_editor_main
node_readme -.->|"describes"| node_uplugin
node_plugin_runtime -->|"reads"| node_plugin_settings
node_plugin_runtime -->|"exposes"| node_volume_actor
node_plugin_runtime -->|"exposes"| node_volume_component
node_volume_actor -->|"owns"| node_volume_component
node_volume_component -->|"uses"| node_ddgi_utils
node_volume_actor -->|"feeds"| node_volume_update
node_volume_update -->|"builds"| node_volume_desc_gpu
node_volume_update -->|"dispatches"| node_probe_update_rgs
node_volume_update -->|"dispatches"| node_relocation_cs
node_volume_update -->|"dispatches"| node_classifier_cs
node_volume_update -->|"dispatches"| node_border_cs
node_volume_update -->|"dispatches"| node_blending_cs
node_volume_visualize -->|"uses"| node_probe_view_rgs
node_plugin_runtime -->|"integrates"| node_apply_lighting
node_plugin_runtime -->|"integrates"| node_upscale_lighting
node_probe_update_rgs -->|"includes"| node_shader_sdk
node_probe_view_rgs -->|"includes"| node_shader_sdk
node_relocation_cs -->|"includes"| node_shader_sdk
node_classifier_cs -->|"includes"| node_shader_sdk
node_border_cs -->|"includes"| node_shader_sdk
node_blending_cs -->|"includes"| node_shader_sdk
node_apply_lighting -->|"includes"| node_shader_sdk
node_upscale_lighting -->|"includes"| node_shader_sdk
node_details_panel -->|"customizes"| node_volume_actor
node_details_panel -->|"customizes"| node_volume_component
node_editor_main -->|"registers"| node_details_panel

click node_uplugin "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/RTXGI.uplugin"
click node_readme "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/README.md"
click node_plugin_runtime "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/RTXGIPlugin.cpp"
click node_plugin_settings "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/RTXGIPluginSettings.cpp"
click node_volume_actor "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/DDGIVolume.cpp"
click node_volume_component "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/DDGIVolumeComponent.cpp"
click node_volume_update "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/DDGIVolumeUpdate.cpp"
click node_volume_desc_gpu "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/DDGIVolumeDescGPU.h"
click node_ddgi_utils "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/DDGIUtilities.cpp"
click node_volume_visualize "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/DDGIVolumeVisualize.cpp"
click node_editor_main "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGIEditor/Private/RTXGIEditor.cpp"
click node_details_panel "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGIEditor/Private/RTXGIDetails.cpp"
click node_probe_update_rgs "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/ProbeUpdateRGS.usf"
click node_probe_view_rgs "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/ProbeViewRGS.usf"
click node_relocation_cs "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/SDK/ddgi/ProbeRelocationCS.usf"
click node_classifier_cs "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/SDK/ddgi/ProbeStateClassifierCS.usf"
click node_border_cs "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/SDK/ddgi/ProbeBorderUpdateCS.usf"
click node_blending_cs "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/SDK/ddgi/ProbeBlendingCS.usf"
click node_apply_lighting "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/ApplyLightingDeferred.usf"
click node_upscale_lighting "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/UpscaleLighting.usf"
click node_shader_sdk "https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/SDK/Common.ush"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_uplugin,node_readme toneBlue
class node_plugin_runtime,node_plugin_settings,node_volume_actor,node_volume_component,node_volume_update,node_volume_desc_gpu,node_ddgi_utils,node_volume_visualize toneAmber
class node_editor_main,node_details_panel toneMint
class node_probe_update_rgs,node_probe_view_rgs,node_relocation_cs,node_classifier_cs,node_border_cs,node_blending_cs,node_apply_lighting,node_upscale_lighting,node_shader_sdk toneRose
```

## Components

### Plugin boundary

Unreal plugin descriptor and integration surface.

- [RTXGI.uplugin](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/RTXGI.uplugin): plugin descriptor · Registers the plugin and its UE modules. · `RTXGI.uplugin`
- [README](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/README.md): docs · Explains DX12/DXR requirements, runtime modes, and usage. · `README.md`

### Runtime module

Gameplay-facing DDGIVolume system and render integration.

- [RTXGI plugin](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/RTXGIPlugin.cpp): runtime integration · Runtime-side plugin entry and configuration wiring. · `Source/RTXGI/Private/RTXGIPlugin.cpp`
- [Plugin settings](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/RTXGIPluginSettings.cpp): config surface · Project settings and runtime cvars for DDGI behavior. · `Source/RTXGI/Private/RTXGIPluginSettings.cpp`
- [DDGIVolume](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/DDGIVolume.cpp): world actor · Placed volume that defines the probe grid and GI region. · `Source/RTXGI/Private/DDGIVolume.cpp`
- [Volume component](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/DDGIVolumeComponent.cpp): Blueprint component · Runtime and Blueprint-accessible control surface for volumes. · `Source/RTXGI/Private/DDGIVolumeComponent.cpp`
- [Volume update](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/DDGIVolumeUpdate.cpp): scheduling · Orchestrates weighted update order, budgets, and frame execution. · `Source/RTXGI/Private/DDGIVolumeUpdate.cpp`
- [GPU desc](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/DDGIVolumeDescGPU.h): data bridge · CPU-to-GPU volume description and layout used by shaders. · `Source/RTXGI/Private/DDGIVolumeDescGPU.h`
- [Utilities](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/DDGIUtilities.cpp): helpers · Shared runtime helpers for DDGI setup and lookup. · `Source/RTXGI/Private/DDGIUtilities.cpp`
- [Visualize DDGI](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGI/Private/DDGIVolumeVisualize.cpp): debug rendering · Runtime visualization of probe volumes and probe state. · `Source/RTXGI/Private/DDGIVolumeVisualize.cpp`

### Editor module

Unreal editor customization for RTXGI content.

- [RTXGIEditor](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGIEditor/Private/RTXGIEditor.cpp): editor module · UE editor-only module bootstrap. · `Source/RTXGIEditor/Private/RTXGIEditor.cpp`
- [RTXGI details](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Source/RTXGIEditor/Private/RTXGIDetails.cpp): editor customization · Customizes DDGIVolume details in the Unreal editor. · `Source/RTXGIEditor/Private/RTXGIDetails.cpp`

### Shader pipeline

GPU passes and shared shader SDK.

- [Probe update](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/ProbeUpdateRGS.usf): ray-gen shader · Ray-traced probe update pass. · `Shaders/Private/ProbeUpdateRGS.usf`
- [Probe view](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/ProbeViewRGS.usf): ray-gen shader · Probe visualization and inspection pass. · `Shaders/Private/ProbeViewRGS.usf`
- [Relocation](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/SDK/ddgi/ProbeRelocationCS.usf): compute shader · Probe relocation and stabilization pass. · `Shaders/Private/SDK/ddgi/ProbeRelocationCS.usf`
- [Classifier](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/SDK/ddgi/ProbeStateClassifierCS.usf): compute shader · Classifies probe state before later passes. · `Shaders/Private/SDK/ddgi/ProbeStateClassifierCS.usf`
- [Border update](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/SDK/ddgi/ProbeBorderUpdateCS.usf): compute shader · Updates edges and border probes. · `Shaders/Private/SDK/ddgi/ProbeBorderUpdateCS.usf`
- [Probe blending](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/SDK/ddgi/ProbeBlendingCS.usf): compute shader · Temporal blending of probe irradiance and distance. · `Shaders/Private/SDK/ddgi/ProbeBlendingCS.usf`
- [Apply lighting](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/ApplyLightingDeferred.usf): deferred shader · Applies DDGI results into UE lighting. · `Shaders/Private/ApplyLightingDeferred.usf`
- [Upscale lighting](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/UpscaleLighting.usf): compute shader · Scales lighting for the final render path. · `Shaders/Private/UpscaleLighting.usf`
- [Shader SDK](https://github.com/invertedgames-dev/rtxgi-ue-5.7-plugin/blob/main/Shaders/Private/SDK/Common.ush): shared headers · Common definitions and data layouts shared by all passes. · `Shaders/Private/SDK/Common.ush`

## Connections

- RTXGI.uplugin → RTXGI plugin: loads · Plugin descriptor registers the runtime module.
- RTXGI.uplugin → RTXGIEditor: loads · Plugin descriptor registers the editor module.
- README → RTXGI.uplugin: describes · Documentation explains plugin usage and boundary conditions.
- RTXGI plugin → Plugin settings: reads · Runtime integration consumes project settings and cvars.
- RTXGI plugin → DDGIVolume: exposes · Runtime module provides the DDGIVolume actor.
- RTXGI plugin → Volume component: exposes · Runtime module provides the component API.
- DDGIVolume → Volume component: owns · Actor delegates runtime control to the component.
- Volume component → Utilities: uses · Blueprint/runtime control path uses shared helpers.
- DDGIVolume → Volume update: feeds · Placed volumes enter the scheduling/update system.
- Volume update → GPU desc: builds · CPU state is marshaled into GPU-visible descriptions.
- Volume update → Probe update: dispatches · Update scheduler drives the ray-traced probe pass.
- Volume update → Relocation: dispatches · Update scheduler drives relocation work.
- Volume update → Classifier: dispatches · Update scheduler drives probe classification.
- Volume update → Border update: dispatches · Update scheduler drives border handling.
- Volume update → Probe blending: dispatches · Update scheduler drives temporal blending.
- Visualize DDGI → Probe view: uses · Visualization path uses the probe view shader.
- RTXGI plugin → Apply lighting: integrates · Runtime module hooks probe data into deferred lighting.
- RTXGI plugin → Upscale lighting: integrates · Runtime module supports lighting upscaling path.
- Probe update → Shader SDK: includes · Shader pass depends on shared SDK definitions.
- Probe view → Shader SDK: includes · Shader pass depends on shared SDK definitions.
- Relocation → Shader SDK: includes · Compute pass depends on shared SDK definitions.
- Classifier → Shader SDK: includes · Compute pass depends on shared SDK definitions.
- Border update → Shader SDK: includes · Compute pass depends on shared SDK definitions.
- Probe blending → Shader SDK: includes · Compute pass depends on shared SDK definitions.
- Apply lighting → Shader SDK: includes · Lighting pass depends on shared SDK definitions.
- Upscale lighting → Shader SDK: includes · Upscale pass depends on shared SDK definitions.
- RTXGI details → DDGIVolume: customizes · Editor panel edits DDGIVolume properties.
- RTXGI details → Volume component: customizes · Editor panel edits component-exposed settings.
- RTXGIEditor → RTXGI details: registers · Editor module registers details customization.
