EDPE is a dxgi.dll proxy for the 2D Direct3D 11 renderer in Elite Dangerous (Cobra engine). It intercepts DXGI and Direct3D 11 calls to add temporal anti-aliasing and upscaling, leaving game binaries, gameplay, and network code untouched.
As of November 2026 (v0.8.0), the working pipeline covers:
-
dxgi.dllproxy forwarding system DXGI calls while hookingIDXGIFactory::CreateSwapChain,IDXGISwapChain::Present, andD3D11CreateDevice/D3D11CreateDeviceAndSwapChainvia IAT. Constant buffer discovery stops once the scene camera is found,Map()/Unmap()andOMSetRenderTargets()use pre-filtered, per-frame memoized camera/jitter paths and a persistent 4-way RTV metadata cache, andedpe.logwrites on a dedicated background worker thread. - Reversed-Z scene depth discovery (
DSV #2,DXGI_FORMAT_R32G8X24_TYPELESS,$B=0.025$ ) and once-per-frame parsing of the 5376-byteCB0camera buffer, with a 2nd-order kinematic filter and projection fallback to reject auxiliary eye, mirror, canopy reflection, and sagittal probes. - Halton
(2,3)subpixel projection jitter injected intoCB0words1080-1095(standing down when reconstruction is off), viewmodel sub-pass jitter coherence and scaled 208-byteCB0support for on-foot weapons/tools, paired with an optimized GPU pass (CPU precomputed relative camera transform) that renders current-to-previous motion vectors toDXGI_FORMAT_R16G16_FLOAT, including analytical rotational motion at infinity for the skybox and stars. - Backend-neutral
TemporalFrameInputsfeedingIUpscalerBackendimplementations for NVIDIA DLAA and DLSS Super Resolution (NGX Project ID48d353f3-d07b-4048-876b-09f8622f5a27, presetsAuto,E,J,K,L,M), AMD FSR 3.1.2 Native AA and Super Resolution (native D3D11 compute), and native D3D11 TAA. Render scale is detected from scene depth versus swapchain dimensions, andCustom.4.4.fxcfg/Custom.4.0.fxcfg<SSAAMultiplier>stays synced when enabled. - Native UI and cockpit HUD separation (
UiLayerandUiCompositePass): pre-HUD clean scene color goes to the upscaler without redundant intermediate copies, cockpit holographic draws are redirected tos_hud_mask_texture(R11G11B10_FLOAT) with viewport unjittering, planetary rings and pre-sky atmosphere stay in the world buffer, the on-foot helmet visor overlay separates cleanly via post-upscale tonemapped delta, and native menus plus HUD are composited back over the reconstructed world. - Multi-device DXGI Keyed Mutex synchronization, Smooth Motion auxiliary device isolation, hardened context hook races, color-source debouncing, crash minidump logging, Wine/Proton compatibility guards, RenderDoc capture annotations (
ScopedRenderDocEvent), DirectInput andWndProcinput isolation when the menu is open (protecting flight controls and HOTAS), async GPU timestamp queries (zero overhead when the Performance HUD and profiler are disabled), and optionalEnableProfiler=1QPC/GPU sub-pass profiling (EDPE PROFILE/EDPE PROFILE_SUB). - D3D11-to-D3D12 interop and Frame Generation (
FgRuntime,D3D11D3D12Bridge,D3D12ProxyPresenter): zero-copy shared NT handle depth/motion/HUD-less transfers + packed premultiplied UI (FgUiPackPass) to a Flip-model D3D12 child overlay swapchain. Supports AMD FSR Frame Generation (verified in-game, e.g.2xoutput scaling with0.08 msbridge copy and automatic menu/loading stand-down) and NVIDIA Streamline DLSS-G (hardware capability-gated prototype for RTX 40+ with clean fail-open status when unsupported). - Dear ImGui overlay (
F5, ProggyForever vector font), toggleable Performance HUD (F7) withPresented FPS (+FG), Frame Gen status, and a 120-sample frametime graph (8.3 msand16.6 msreference lines, 15 Hz text refresh, background NVML GPU/VRAM polling), sequential comparison capture tocomparison/(16-frame warmup, 5-second wait between backends), andDEV=0/DEV=1gating for developer panels andF9(jitter_view.log).
| Phase | Milestone | Status | Summary |
|---|---|---|---|
| 0-2 | Reconnaissance and resource census | Verified | Tracked D3D11 context calls, swapchain layout (2560x1440 R8G8B8A8), MRT bindings, and CB0 lifecycle. |
| 3 | Scene depth extraction | Verified | Confirmed DSV #2 reversed-Z depth buffer ( |
| 4 | Camera and projection tracking | Verified | Parsed the 5376-byte dynamic CB0 and latched the primary 3D camera once per frame. |
| 5 | Projection jitter injection | Verified | Injected Halton (2,3) jitter into CB0 with fail-open bypass when upscaling is off. |
| 6 | Motion vectors pass | Verified | Generated screen-space camera-depth motion vectors into R16G16_FLOAT plus skybox rotational motion. |
| 7 | Shared temporal input layer | Verified | Implemented backend-neutral TemporalFrameInputs and IUpscalerBackend. |
| 8 | NVIDIA DLAA | Verified | Integrated official NGX DLAA at native resolution (~0.3 ms GPU time at 1440p). |
| 9-10 | Render scale and NVIDIA DLSS SR | Verified | Lowered 3D render scale via Cobra <SSAAMultiplier> (< 1.0x) with automatic resolution detection. |
| 11 | AMD FSR 3.1.2 | Verified | Integrated native D3D11 FidelityFX FSR 3.1.2 for both Native AA and Super Resolution. |
| 12 | Native-resolution HUD separation | Verified | Redirected cockpit HUD draws to s_hud_mask_texture (UiLayer) and composited native UI over the upscaled scene (UiCompositePass). |
| 13 | D3D11/D3D12 interoperability | Verified | Implemented shared NT handle texture/fence bridge (D3D11D3D12Bridge) and Flip-model D3D12 child overlay swapchain (D3D12ProxyPresenter). |
| 14 | AMD FSR Frame Generation | Verified | Integrated official FidelityFX Frame Generation DX12 via AmdFsrFgBackend; verified in-game with UI packing and automatic menu stand-down. |
| 15 | NVIDIA Streamline / DLSS-G | Prototype / Capability-gated | Integrated official Streamline v2.14.16 (NvidiaStreamlineFgBackend, Reflex/PCL/DLSS-G) with hardware capability gating and fail-open fallback. |
| 16 | Intel XeSS, AMD FSR 4 & DittoSR | Planned | Planned Intel XeSS (XMX on Arc, DP4a fallback), AMD FSR 4 (4.1.2 for RX 7000/9000, #27), and DittoSR (lightweight MIT-licensed alternative compared with FSR 3.1.2) Native AA and Super Resolution via D3D11/D3D12 interop. |
| 17 | Low-latency integration | Planned | Planned standalone and FG-coupled latency pacing via NVIDIA Reflex and AMD Anti-Lag / Anti-Lag 2. |
| 18 | NVIDIA DLSS-NR | Research | Investigating NGX Neural Rendering for reflections and lighting. |
| 19 | Third-party mod compatibility | Planned | Planned proxy DLL chaining and compatibility with ReShade, EDHM, and 3Dmigoto. |
See STATUS.md for verified test and capture logs, and PLAN.md for the full technical roadmap.
Elite-specific observation and temporal input generation stay inside EDPE; vendor SDK calls sit behind IUpscalerBackend.
flowchart TD
Game["Elite Dangerous (Cobra D3D11)"] --> Proxy["dxgi.dll Proxy & IAT Hooks"]
Proxy --> Census["Context Census & CB0 Tracking<br/>Reverse-Z Depth (DSV #2)<br/>CB0 Camera Matrices<br/>HUD Draw Redirection (UiLayer)"]
Proxy --> Swapchain["Swapchain Observer<br/>Backbuffer & Present Hooks<br/>WndProc / DirectInput Filter"]
Census --> TemporalGen["Temporal Input Generation<br/>Halton (2,3) Jitter<br/>GPU Motion Pass (R16G16_FLOAT)"]
TemporalGen --> SharedInputs["TemporalFrameInputs"]
Swapchain --> SharedInputs
subgraph Backends ["IUpscalerBackend"]
Nvidia["NVIDIA NGX<br/>(DLAA / DLSS SR)"]
Amd["AMD FidelityFX<br/>(FSR 3.1.2 Native AA / SR)"]
Taa["Native D3D11 TAA"]
end
SharedInputs --> Nvidia
SharedInputs --> Amd
SharedInputs --> Taa
Nvidia --> Composite["UiCompositePass<br/>(Native HUD & Menus)"]
Amd --> Composite
Taa --> Composite
Composite --> ImGui["Dear ImGui Menu (F5) & Perf HUD (F7)"]
ImGui --> Bridge{"D3D11/D3D12 Bridge<br/>& Frame Gen"}
Bridge -->|Off / Fail-open| Present["IDXGISwapChain::Present"]
Bridge -->|Active| FG["AMD FSR FG / NVIDIA DLSS-G<br/>(D3D12ProxyPresenter)"]
FG --> Present
If an upscaler or Frame Generation backend fails to initialize or evaluate (or runs on unsupported hardware), EDPE disables the failing stage and presents normally without black screens.
| Hotkey | Action | Notes |
|---|---|---|
F5 |
Toggle EDPE menu | Opens and closes the Dear ImGui panel. When closed, mouse and keyboard input passes straight to the game. |
F7 |
Toggle Performance HUD | Shows or hides FPS, Presented FPS (+FG), 1% low FPS, game/upscaler/total frametimes, frametime graph, GPU usage, VRAM usage, and Frame Gen status. |
F9 |
Record jitter diagnostics | Available only when DEV=1. Starts or stops frame-indexed logging to jitter_view.log. |
Inside the F5 menu:
HUD & UI Scaling: toggle the Performance HUD, pick one of 8 anchor positions (or drag the HUD directly while the menu is open), and adjustHUD ScaleandUI Scale(0.50xto2.50x).Upscaler & Image Quality: switch betweenNative (Bypass),NVIDIA DLSS / DLAA,AMD FSR (Native AA / SR), andTAA (Temporal Anti-Aliasing), choose the DLSS preset (Auto,E (CNN Fast),J,K,L,M), adjust sharpening (0.00to1.00), and togglePreserve Native UI.Frame Generation: switch betweenOff,AMD FSR Frame Generation, andNVIDIA DLSS-G(availability and multiplier options are capability-driven; showsRendered FPS,Presented FPS,Total Generated,D3D12 Copylatency, and live status).RenderDoc: enable or force D3D11/D3D12 debug annotations and trigger manual frame captures when RenderDoc is attached.Debug View: switch betweenNoneandSubpixel Jitterto highlight jittered pixels in green over a desaturated scene. (The HUD mask debug pass inhud_debug_pass.cpphas no UI toggle and is only exercised byhud_debug_testor[HUD] DebugView=1inedpe.ini.)- Developer panels (
DEV=1): sequential comparison capture across active backends (comparison/), DSV bind sequence and snapshot viewers (depth, scene color, emissive, motion, HUD mask), jitter overrides andjitter.logcontrols, and motion vector tuning (ZeroMotion,InvertX,InvertY,Scale).
EDPE reads and writes edpe.ini in the same folder as EliteDangerous64.exe, and writes runtime diagnostics to edpe.log.
Upscaling quality ratios follow Elite Dangerous's in-game Supersampling setting (Options -> Graphics -> Display -> Supersampling or <SSAAMultiplier> in Custom.4.4.fxcfg / Custom.4.0.fxcfg), determined automatically from scene depth dimensions:
1.0x: Native AA (DLAA, FSR Native AA, or TAA)0.67x: Quality0.58x: Balanced0.50x: Performance0.33x: Ultra Performance
Example edpe.ini matching the keys read by src/config.h (note that edpe.ini in the repository ships with a minimal subset, and missing keys fall back to config.h defaults):
[Upscaler]
; 0 = Native (Bypass), 1 = NVIDIA DLSS/DLAA, 2 = AMD FSR, 3 = Native D3D11 TAA
Backend=0
; DLSS Preset: 0 = Auto (K), 5 = E (CNN Fast), 10 = J, 11 = K, 12 = L, 13 = M
Preset=0
AutoSyncEliteConfig=1
PreserveNativeUi=1
HdrInput=0
Sharpness=0.50
[FrameGeneration]
; 0 = Off, 1 = AMD FSR Frame Generation, 2 = NVIDIA DLSS-G
Backend=0
Multiplier=2
DynamicMfg=0
DynamicTargetFps=0.0
ReflexBoost=0
[Jitter]
Enabled=1
InvertX=0
InvertY=0
SwapXY=0
Scale=1.00
; Repo edpe.ini defaults to 8; config.h fallback is 32 if omitted
PhaseCount=8
Mode=auto
[Motion]
ZeroMotion=0
InvertX=0
InvertY=0
Scale=1.00
[Overlay]
ShowPerfOverlay=1
EnableProfiler=0
; 0=Top-Left, 1=Top, 2=Top-Right, 3=Left, 4=Right, 5=Bottom-Left, 6=Bottom, 7=Bottom-Right
Corner=1
Scale=1.50 ; Performance HUD scale (0.50 - 2.50 in UI)
UiScale=1.00 ; Menu UI scale (0.50 - 2.50 in UI)
PosX=1900.0 ; Custom dragged X (-1.0 uses Corner)
PosY=496.0 ; Custom dragged Y (-1.0 uses Corner)
DEV=0 ; 0 = standard mode, 1 = show dev panels and enable F9
[RenderDoc]
EnableAnnotations=1
ForceAnnotations=0Requirements:
- Windows 10/11 x64
- Visual Studio 2022 with Desktop development with C++ (MSVC x64 toolchain and Windows SDK)
- CMake 3.25 or newer
- Python 3 (CMake runs
tools/fetch_ffx_dx11.pyautomatically ifexternal/ffx-dx11is missing) external/imguiGit submodule- Optional: NVIDIA NGX / DLSS SDK (
v310.9.16) underexternal/DLSS(if omitted, CMake builds without DLAA/DLSS support) - Optional: AMD FidelityFX SDK under
external/ffx-sdk(if present, enablesEDPE_ENABLE_FFX_FG/amd_fsr_fg_dx12_x64.dllruntime staging) - Optional: NVIDIA Streamline SDK under
external/streamline(if present, enablesEDPE_ENABLE_STREAMLINE/sl.*.dllruntime staging)
Clone and initialize submodules:
git clone https://github.com/filispeen/EDPE.git
cd EDPE
git submodule update --init --recursiveOptionally, install-build-requirements.ps1 installs Git, CMake, and Visual Studio Build Tools via winget and initializes submodules:
powershell -NoProfile -ExecutionPolicy Bypass -File .\install-build-requirements.ps1Configure and build from an x64 Native Tools Command Prompt for VS 2022 (or x64 Developer PowerShell):
cmake -S . -B build -A x64
cmake --build build --config Release --parallelBuild outputs:
build/Release/dxgi.dll: compiled proxy DLLbuild/stage/: staged runtime files (dxgi.dll, plusnvngx_dlss.dll,amd_fidelityfx_framegeneration_dx12.dll/ FFX loader DLLs, andsl.*.dllwhen the optional vendor SDKs are present)
Run the 26 automated tests with CTest:
ctest --test-dir build -C Release --output-on-failureTest targets in CMakeLists.txt:
temporal_math: Halton sequence generation, projection blocks, matrix rejection invariantsmotion_stage2: Stage 2 weapon/celestial motion and pixel classification checkscamera_delta: camera delta math, event flags, scene reset detectioncapture_format: half-float, float11/10 unpackers, depth contrast, Reinhard tone mappingtemporal_inputs: scaling math, input validation, NVIDIA/AMD conventions, fail-open behaviormotion_gpu: Direct3D 11 GPU motion passui_composite: native UI isolation and holographic HUD mask compositinghud_debug: HUD debug pass modes and null fallback safetydxbc_fanout: shader bytecode interception and hashingjitter_view_report: jitter diagnostics report generationcrash_logger: SEH crash minidump generationui_menu_size: Dear ImGui menu sizing and layout boundsvtable_hook:LiveCopyvtable hook initialization, drift detection, and unhook restorationrenderdoc_support: RenderDoc In-App API loading, annotation state, and Wine/Vulkan debug markersd3d11_d3d12_bridge: D3D11/D3D12 shared NT handle textures and shared fence synchronizationd3d12_presenter: Flip-model D3D12 child overlay swapchain presentation and resize lifecyclefg_backend:FrameGenerationManagerstate transitions, camera matrix extraction, and fail-open logicamd_fsr_fg: AMD FidelityFX Frame Generation DX12 backend lifecycle and evaluationnvidia_sl_fg: NVIDIA Streamline DLSS-G backend initialization and capability probingfg_integration: end-to-endFgRuntimeswapchain proxy, menu pause stand-down, and resize recoveryproxy_smoke: DLL load, Present hook, and input pass-throughproxy_shader_probe: shader bytecode interception smoke testproxy_alias_smoke: stageddxgi.dllloading smoke test
- Build the project or download a release archive from Releases.
- Open the folder containing
EliteDangerous64.exe(for exampleProducts\elite-dangerous-odyssey-64orProducts\elite-dangerous-64). - Copy
build/stage/dxgi.dll(andbuild/stage/nvngx_dlss.dllfor NVIDIA DLAA/DLSS) next toEliteDangerous64.exe. Remove any legacyd3d11.dllfrom older versions. - Launch Elite Dangerous through the Frontier Launcher or Steam.
- Press
F5in-game to open the menu and select an upscaler backend. Checkedpe.lognext toEliteDangerous64.exeif something fails to initialize.
To uninstall, delete or rename dxgi.dll and nvngx_dlss.dll in the game folder.
- Copy
dxgi.dll(andnvngx_dlss.dllif using NVIDIA DLSS/DLAA) next toEliteDangerous64.exeinside your Steam library (.../steamapps/common/Elite Dangerous/Products/elite-dangerous-odyssey-64/). - Set the Steam launch options for Elite Dangerous:
- Standard (AMD FSR / TAA):
WINEDLLOVERRIDES="dxgi=n,b" %command% - NVIDIA DLSS / DLAA:
PROTON_ENABLE_NVAPI=1 WINEDLLOVERRIDES="dxgi=n,b" %command%
- Standard (AMD FSR / TAA):
- DXVK constant-buffer performance: EDPE automatically enables its cached RAM constant-buffer map-bounce pool (
[Pipeline] MapBounceMode=auto) under Wine/Proton to avoid slow CPU reads from DXVK write-combined BAR memory. For diagnostic comparison, you can setMapBounceMode=offinedpe.iniand testd3d11.cachedDynamicResources = cin adxvk.conffile next toEliteDangerous64.exe. - Input & logs:
[Input] WrapDirectInputKeyboarddefaults to0under Wine/Proton so remapped and virtual keys work reliably. Diagnostic logs (edpe.log) are written directly next toEliteDangerous64.exe. - Optional
dxgi.dllchaining: To chain EDPE with anotherdxgi.dllwrapper (such as ReShade or a custom DXVK build), rename the other DLL (for exampledxgi_reshade.dll) and set[Proxy] ChainDxgiDll=dxgi_reshade.dllinedpe.ini.
EDPE/
├── external/
│ └── imgui/ # Dear ImGui submodule (plus optional DLSS / ffx-dx11 SDKs)
├── src/
│ ├── shaders/
│ │ └── ui_layer_composite_cs.hlsl # Compute shader for native UI layer compositing
│ ├── amd_fsr_fg_backend.cpp / .h # AMD FidelityFX Frame Generation DX12 backend
│ ├── camera_delta.h # Camera motion delta and reset detection
│ ├── capture_format.h # Texture format unpackers and tone-mapping helpers
│ ├── cobra_camera_inject.h # CB0 projection jitter injection helpers
│ ├── code_hook.h / vtable_hook.h # Inline/IAT and LiveCopy vtable hooking utilities
│ ├── config.h / version.cpp # Central edpe.ini serialization and kVersion
│ ├── context_census.cpp / .h # D3D11 observation, CB0 parsing, pipeline orchestration
│ ├── crash_logger.cpp / .h # Unhandled exception handler and minidump writer
│ ├── d3d11_proxy.cpp / .h # D3D11CreateDevice IAT hooks
│ ├── d3d12_bridge.cpp / .h # D3D11/D3D12 shared NT handle texture and fence bridge
│ ├── d3d12_presenter.cpp / .h # Flip-model D3D12 child overlay proxy swapchain
│ ├── dinput_proxy.h # DirectInput8 isolation when menu is active
│ ├── dllmain.cpp # DLL entry point
│ ├── dxbc_hash.cpp / dxbc_fanout.h # DXBC shader hashing and draw fanout
│ ├── dxgi_observer.cpp # Swapchain Present / ResizeBuffers observation
│ ├── dxgi_proxy.cpp / .def # dxgi.dll export forwarding and factory hooks
│ ├── elite_camera.h # 5376-byte CB0 camera parser
│ ├── fg_backend.cpp / .h # Vendor-neutral IFrameGenerationBackend & manager
│ ├── fg_integration.cpp / .h # Live FgRuntime DXGI Present / UI / Bridge integration
│ ├── fg_ui_pack_pass.cpp / .h # Premultiplied RGBA16F UI packing pass for FG
│ ├── hud_debug_pass.cpp / .h # HUD mask debug shader pass (with hud_debug_shader.h)
│ ├── input_hook.cpp / .h # WndProc and DirectInput interception
│ ├── jitter_debug_pass.cpp / .h # Subpixel jitter debug visualization pass
│ ├── jitter_logger.cpp / .h # Background jitter.log writer
│ ├── jitter_view_recorder.cpp / .h # F9 jitter_view.log recorder (DEV=1)
│ ├── log.cpp / .h # Asynchronous background edpe.log writer
│ ├── motion_pass.cpp / .h # GPU camera-depth and skybox motion pass
│ ├── ngx_context.cpp / .h # NVIDIA NGX DLAA/DLSS wrapper
│ ├── nvidia_sl_fg_backend.cpp / .h # NVIDIA Streamline DLSS-G backend & capability probe
│ ├── perf_overlay.cpp / .h # F7 Performance HUD and NVML poller
│ ├── profiler.h # QPC per-pass profiler
│ ├── renderdoc_support.cpp / .h # RenderDoc In-App API and D3D11/D3D12 annotations
│ ├── sharpen_pass.cpp / .h # Sharpening pass helpers
│ ├── taa_pass.cpp / .h # Native D3D11 TAA compute pass
│ ├── temporal_inputs.h # Backend-neutral TemporalFrameInputs contract
│ ├── temporal_math.h # Halton sequence and matrix validation math
│ ├── ui.cpp / .h # Dear ImGui F5 menu, snapshot windows, hotkeys
│ ├── ui_composite_pass.cpp / .h # Native UI and HUD mask composite pass
│ ├── ui_layer.cpp / .h # Live cockpit HUD draw redirection layer
│ └── upscaler_backend.cpp / .h # IUpscalerBackend implementations (DLSS, FSR 3.1.2, TAA)
├── tests/ # 21 source files producing 23 CTest targets
├── tools/
│ ├── fetch_ffx_dx11.py # Fetches and builds FidelityFX DX11 SDK
│ └── ngx_probe/ # Standalone hardware NGX diagnostic probe
├── docs/ # Reverse-engineering notes and backend input contracts
├── PLAN.md # 19-phase architectural roadmap
├── STATUS.md # Verified empirical findings and milestone log
└── AGENTS.md # Project architecture and engineering rules
- STATUS.md: verified facts, milestone logs, and test status
- PLAN.md: full 19-phase roadmap
- AGENTS.md: engineering rules and architecture boundaries
- BUILD.md: legacy NMake build notes
- docs/render-pipeline-observations.md: Elite Dangerous MRT layout, depth buffers, and pass order
- docs/nvidia-dlaa-input-contract.md: NVIDIA NGX DLAA input requirements
- docs/amd-fsr-input-contract.md: AMD FidelityFX FSR input requirements
- docs/elite-input-conventions.md: Cobra camera, coordinate system, and projection conventions
- docs/shared-temporal-inputs.md:
TemporalFrameInputsspecification
- characterecho-sean/edvr-unofficial-patch: reference for depth discovery and motion injection in Cobra
- ocornut/imgui: Dear ImGui overlay
- NVIDIA NGX SDK and AMD FidelityFX SDK
світла пам'ять соні, моїй любій кішці яка померла 24 січня 26-го року около 1:00 AM, день коли вона помирала і останній раз в своєму житті лежала у мене на ногах поки я працював над цим проєктом