# 3zwr1/amd-nr---optiscaler architecture

> Architecture diagram of the GitHub repository 3zwr1/amd-nr---optiscaler, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/3zwr1/amd-nr---optiscaler
- Repository: https://github.com/3zwr1/amd-nr---optiscaler

## Overview

AMDNR combines an injected OptiScaler-based game runtime with a Windows launcher that discovers games and manages installation, updates, proxy selection, and removal. In-game, the game’s graphics calls enter through the injected DLL and wrapped swapchains; feature providers select rendering backends and upscaler implementations. The README also documents neural rendering, frame generation, Ray Regeneration, and Screen GI. Launcher and runtime links reflect sampled source; several documented runtime capabilities lack sampled implementation files, so their internal wiring is intentionally not expanded.

Main entry points: [`Launcher/OpenSource/src/AmdnrLauncher.App/ViewModels/MainViewModel.cs`](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/Launcher/OpenSource/src/AmdnrLauncher.App/ViewModels/MainViewModel.cs) (Launcher UI), [`Launcher/OpenSource/src/AmdnrLauncher.Core/LauncherService.cs`](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/Launcher/OpenSource/src/AmdnrLauncher.Core/LauncherService.cs) (Launcher Service), [`main/AMDNR-source/dllmain.cpp`](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/main/AMDNR-source/dllmain.cpp) (DLL Entry), [`Launcher/OpenSource/src/AmdnrLauncher.Core/Install/Installer.cs`](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/Launcher/OpenSource/src/AmdnrLauncher.Core/Install/Installer.cs) (Install Manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launcher["Launcher"]
  node_launcher_ui["Launcher UI<br/>[MainViewModel.cs]"]
  node_service["Launcher Service<br/>[LauncherService.cs]"]
  node_scanners["Game Discovery<br/>[Scanning]"]
  node_update_service["Updates<br/>[SelfUpdater.cs]"]
end

subgraph group_game_install["Game Management"]
  node_install["Install Manager<br/>[Installer.cs]"]
  node_diagnostics["Install Checks<br/>[InstallGate.cs]"]
  node_game_db[("Installed Games")]
  node_asset_service["Package Assets<br/>[Assets]"]
end

subgraph group_runtime["Injected Runtime"]
  node_injected_dll["DLL Entry<br/>[dllmain.cpp]"]
  node_config["Runtime Configuration<br/>[Config.cpp]"]
  node_swapchain["Swapchain Wrappers"]
  node_dx11_bridge["DX11 on DX12"]
  node_logger["Runtime Logs<br/>[Logger.cpp]"]
end

subgraph group_rendering["Rendering Features"]
  node_feature_provider["Feature Selection"]
  node_upscalers["Upscaler Backends"]
  node_neural_runtime["Neural Rendering"]
  node_frame_generation["Frame Generation"]
  node_ray_regen["Ray Regeneration"]
  node_screen_gi["Screen GI"]
end

node_user(("Player"))
node_game["D3D12 Game"]
node_update_host["Update Manifest"]
node_game_folder[("Game Folder")]

node_user -->|"manages games"| node_launcher_ui
node_launcher_ui -->|"requests operations"| node_service
node_service -->|"scans libraries"| node_scanners
node_scanners -->|"loads manual paths"| node_game_db
node_launcher_ui -->|"downloads packages"| node_asset_service
node_launcher_ui -->|"checks updates"| node_update_service
node_update_service -->|"fetches update"| node_update_host
node_launcher_ui -->|"installs or removes"| node_service
node_service -->|"checks eligibility"| node_diagnostics
node_service -->|"runs file changes"| node_install
node_install -->|"places or restores files"| node_game_folder
node_install -->|"saves install record"| node_game_db
node_game -->|"loads proxy DLL"| node_injected_dll
node_injected_dll -->|"reads settings"| node_config
node_injected_dll -->|"hooks graphics"| node_swapchain
node_swapchain -->|"dispatches features"| node_feature_provider
node_feature_provider -->|"selects backend"| node_upscalers
node_feature_provider -->|"selects when supported"| node_ray_regen
node_upscalers -.->|"runs neural pass"| node_neural_runtime
node_swapchain -->|"presents frames"| node_frame_generation
node_dx11_bridge -->|"bridges presentation"| node_frame_generation
node_injected_dll -->|"starts session logs"| node_logger
node_user -->|"launches"| node_game

click node_launcher_ui "https://github.com/3zwr1/amd-nr---optiscaler/blob/main/Launcher/OpenSource/src/AmdnrLauncher.App/ViewModels/MainViewModel.cs"
click node_service "https://github.com/3zwr1/amd-nr---optiscaler/blob/main/Launcher/OpenSource/src/AmdnrLauncher.Core/LauncherService.cs"
click node_scanners "https://github.com/3zwr1/amd-nr---optiscaler/tree/main/Launcher/OpenSource/src/AmdnrLauncher.Core/Scanning"
click node_install "https://github.com/3zwr1/amd-nr---optiscaler/blob/main/Launcher/OpenSource/src/AmdnrLauncher.Core/Install/Installer.cs"
click node_diagnostics "https://github.com/3zwr1/amd-nr---optiscaler/blob/main/Launcher/OpenSource/src/AmdnrLauncher.Core/Install/InstallGate.cs"
click node_game_db "https://github.com/3zwr1/amd-nr---optiscaler/blob/main/Launcher/OpenSource/src/AmdnrLauncher.Core/State/InstalledGamesDb.cs"
click node_asset_service "https://github.com/3zwr1/amd-nr---optiscaler/tree/main/Launcher/OpenSource/src/AmdnrLauncher.Core/Assets"
click node_update_service "https://github.com/3zwr1/amd-nr---optiscaler/blob/main/Launcher/OpenSource/src/AmdnrLauncher.App/Services/SelfUpdater.cs"
click node_injected_dll "https://github.com/3zwr1/amd-nr---optiscaler/blob/main/main/AMDNR-source/dllmain.cpp"
click node_config "https://github.com/3zwr1/amd-nr---optiscaler/blob/main/main/AMDNR-source/Config.cpp"
click node_swapchain "https://github.com/3zwr1/amd-nr---optiscaler/blob/main/main/AMDNR-source/wrapped/wrapped_swapchain.cpp"
click node_dx11_bridge "https://github.com/3zwr1/amd-nr---optiscaler/blob/main/main/AMDNR-source/with_dx12/dx11_with_dx12_sc.cpp"
click node_feature_provider "https://github.com/3zwr1/amd-nr---optiscaler/blob/main/main/AMDNR-source/upscalers/FeatureProvider_Dx12.cpp"
click node_upscalers "https://github.com/3zwr1/amd-nr---optiscaler/tree/main/main/AMDNR-source/upscalers"
click node_neural_runtime "https://github.com/3zwr1/amd-nr---optiscaler/tree/main/main/AMDNR-source/upscalers"
click node_frame_generation "https://github.com/3zwr1/amd-nr---optiscaler/tree/main/main/AMDNR-source/with_dx12"
click node_ray_regen "https://github.com/3zwr1/amd-nr---optiscaler/blob/main/main/AMDNR-source/upscalers/FeatureProvider_Dx12.cpp"
click node_screen_gi "https://github.com/3zwr1/amd-nr---optiscaler/tree/main/main/AMDNR-source/upscalers"
click node_logger "https://github.com/3zwr1/amd-nr---optiscaler/blob/main/main/AMDNR-source/Logger.cpp"

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_launcher_ui,node_service,node_scanners,node_update_service toneBlue
class node_install,node_diagnostics,node_game_db,node_asset_service,node_game_folder toneAmber
class node_injected_dll,node_config,node_swapchain,node_dx11_bridge,node_logger toneMint
class node_feature_provider,node_upscalers,node_neural_runtime,node_frame_generation,node_ray_regen,node_screen_gi toneRose
class node_user,node_game,node_update_host toneIndigo
```

## Components

### Launcher

- [Launcher UI](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/Launcher/OpenSource/src/AmdnrLauncher.App/ViewModels/MainViewModel.cs): `Launcher/OpenSource/src/AmdnrLauncher.App/ViewModels/MainViewModel.cs`
- [Launcher Service](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/Launcher/OpenSource/src/AmdnrLauncher.Core/LauncherService.cs): `Launcher/OpenSource/src/AmdnrLauncher.Core/LauncherService.cs`
- [Game Discovery](https://github.com/3zwr1/amd-nr---optiscaler/tree/main/Launcher/OpenSource/src/AmdnrLauncher.Core/Scanning): `Launcher/OpenSource/src/AmdnrLauncher.Core/Scanning`
- [Updates](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/Launcher/OpenSource/src/AmdnrLauncher.App/Services/SelfUpdater.cs): `Launcher/OpenSource/src/AmdnrLauncher.App/Services/SelfUpdater.cs`

### Game Management

- [Install Manager](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/Launcher/OpenSource/src/AmdnrLauncher.Core/Install/Installer.cs): `Launcher/OpenSource/src/AmdnrLauncher.Core/Install/Installer.cs`
- [Install Checks](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/Launcher/OpenSource/src/AmdnrLauncher.Core/Install/InstallGate.cs): `Launcher/OpenSource/src/AmdnrLauncher.Core/Install/InstallGate.cs`
- [Installed Games](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/Launcher/OpenSource/src/AmdnrLauncher.Core/State/InstalledGamesDb.cs): `Launcher/OpenSource/src/AmdnrLauncher.Core/State/InstalledGamesDb.cs`
- [Package Assets](https://github.com/3zwr1/amd-nr---optiscaler/tree/main/Launcher/OpenSource/src/AmdnrLauncher.Core/Assets): `Launcher/OpenSource/src/AmdnrLauncher.Core/Assets`

### Injected Runtime

- [DLL Entry](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/main/AMDNR-source/dllmain.cpp): `main/AMDNR-source/dllmain.cpp`
- [Runtime Configuration](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/main/AMDNR-source/Config.cpp): `main/AMDNR-source/Config.cpp`
- [Swapchain Wrappers](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/main/AMDNR-source/wrapped/wrapped_swapchain.cpp): `main/AMDNR-source/wrapped/wrapped_swapchain.cpp`
- [DX11 on DX12](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/main/AMDNR-source/with_dx12/dx11_with_dx12_sc.cpp): `main/AMDNR-source/with_dx12/dx11_with_dx12_sc.cpp`
- [Runtime Logs](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/main/AMDNR-source/Logger.cpp): `main/AMDNR-source/Logger.cpp`

### Rendering Features

- [Feature Selection](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/main/AMDNR-source/upscalers/FeatureProvider_Dx12.cpp): `main/AMDNR-source/upscalers/FeatureProvider_Dx12.cpp`
- [Upscaler Backends](https://github.com/3zwr1/amd-nr---optiscaler/tree/main/main/AMDNR-source/upscalers): `main/AMDNR-source/upscalers`
- [Neural Rendering](https://github.com/3zwr1/amd-nr---optiscaler/tree/main/main/AMDNR-source/upscalers): `main/AMDNR-source/upscalers`
- [Frame Generation](https://github.com/3zwr1/amd-nr---optiscaler/tree/main/main/AMDNR-source/with_dx12): `main/AMDNR-source/with_dx12`
- [Ray Regeneration](https://github.com/3zwr1/amd-nr---optiscaler/blob/main/main/AMDNR-source/upscalers/FeatureProvider_Dx12.cpp): `main/AMDNR-source/upscalers/FeatureProvider_Dx12.cpp`
- [Screen GI](https://github.com/3zwr1/amd-nr---optiscaler/tree/main/main/AMDNR-source/upscalers): `main/AMDNR-source/upscalers`

### Other components

- **Player**
- **D3D12 Game**
- **Update Manifest**
- **Game Folder**

## Connections

- Player → Launcher UI: manages games
- Launcher UI → Launcher Service: requests operations
- Launcher Service → Game Discovery: scans libraries
- Game Discovery → Installed Games: loads manual paths
- Launcher UI → Package Assets: downloads packages
- Launcher UI → Updates: checks updates
- Updates → Update Manifest: fetches update
- Launcher UI → Launcher Service: installs or removes
- Launcher Service → Install Checks: checks eligibility
- Launcher Service → Install Manager: runs file changes
- Install Manager → Game Folder: places or restores files
- Install Manager → Installed Games: saves install record
- D3D12 Game → DLL Entry: loads proxy DLL
- DLL Entry → Runtime Configuration: reads settings
- DLL Entry → Swapchain Wrappers: hooks graphics
- Swapchain Wrappers → Feature Selection: dispatches features
- Feature Selection → Upscaler Backends: selects backend
- Feature Selection → Ray Regeneration: selects when supported
- Upscaler Backends → Neural Rendering: runs neural pass
- Swapchain Wrappers → Frame Generation: presents frames
- DX11 on DX12 → Frame Generation: bridges presentation
- DLL Entry → Runtime Logs: starts session logs
- Player → D3D12 Game: launches
