Direct3D9 proxy DLL for RTX Remix camera/transform reconstruction.
This project wraps IDirect3D9 and IDirect3DDevice9, inspects vertex shader constant uploads, reconstructs camera transforms, and forwards fixed-function WORLD / VIEW / PROJECTION state before draw calls so Remix can consume consistent matrices in programmable DX9 games.
- Caches matrix candidates from
SetVertexShaderConstantFuploads. - Classifies matrices deterministically (World/View/Projection) using structural checks.
- Supports register overrides (
ViewMatrixRegister,ProjMatrixRegister,WorldMatrixRegister) when a game uses known fixed slots. - Emits
SetTransform(D3DTS_WORLD/VIEW/PROJECTION)at draw time (DrawPrimitive,DrawIndexedPrimitive,DrawPrimitiveUP,DrawIndexedPrimitiveUP). - Falls back to identity for missing matrix slots to keep fixed-function state valid.
When AutoDetectMatrices=1, uploaded 4x4 / 4x3 ranges are analyzed and classified:
- Projection: perspective-style structure + FOV validation (
MinFOV,MaxFOV). - View: strict camera-style affine/orthonormal checks.
- World: affine matrix that is not classified as strict view.
Optional probes:
ProbeTransposedLayouts=1checks one transposed candidate pass.ProbeInverseView=1allows inverse-view style view recovery checks.
If full W/V/P is not resolved, combined MVP decomposition can be enabled:
EnableCombinedMVPCombinedMVPRequireWorldCombinedMVPAssumeIdentityWorldCombinedMVPForceDecompositionCombinedMVPLogDecomposition
For difficult titles, an experimental projection fallback can be enabled:
- Manual 4x4 projection matrix mode.
- Auto-generated projection mode (FOV / near / far / aspect / handedness controls).
- Optional override flags for detected projection and combined-MVP projection.
Relevant keys are prefixed with ExperimentalCustomProjection* in camera_proxy.ini.
GameProfile can switch from general structural detection to game-aware register mapping:
MetalGearRising- Projection
c4-c7 - ViewProjection
c8-c11(proxy derives View) - World
c16-c19 - Tracks optional WorldView
c20-c23
- Projection
DevilMayCry4(orDMC4)- Combined MVP
c0-c3 - World
c0-c3 - View
c4-c7 - Projection
c8-c11
- Combined MVP
If no profile is set, the proxy uses structural detection + optional register overrides.
Built-in ImGui overlay includes:
- Camera matrix display/state source info.
- Shader constant inspection and editing tools.
- Optional memory scanner panel.
- In-overlay logs.
Runtime controls:
ImGuiScalePercentfor global overlay scaling.- Hotkeys (default):
- F10 menu toggle (
HotkeyToggleMenuVK) - F9 pause rendering (
HotkeyTogglePauseVK) - F8 emit cached matrices (
HotkeyEmitMatricesVK) - F7 reset matrix register overrides (
HotkeyResetMatrixOverridesVK)
- F10 menu toggle (
- Install RTX Remix runtime files in your game directory.
- Rename Remix runtime DLL to
d3d9_remix.dll(or setRemixDllName). - Copy this project's built
d3d9.dllinto the game directory. - Copy
camera_proxy.iniinto the same directory. - Launch the game and toggle the overlay with F10 (default).
- Visual Studio 2019 or 2022 with C++ workload
- Windows SDK (included with Visual Studio)
- ImGui source files in
imgui/subdirectory
For X64 builds (default):
- Open "x64 Native Tools Command Prompt for VS" from Start Menu
- Navigate to the project directory
- Run:
build.bator explicitly:
build.bat x64For X86 builds (32-bit):
- Open "x86 Native Tools Command Prompt for VS" from Start Menu
- Run:
build.bat x86do_build.bat- Default output:
d3d9.dll(architecture matches the command prompt environment) - The build script will warn if you're in the wrong architecture environment
The DLL logs its build architecture on startup. Check camera_proxy.log for:
Build architecture: x64 (64-bit)
Pointer size: 8 bytes
Size of uintptr_t: 8 bytes
If you see x86 (32-bit) and Pointer size: 4 bytes, you built for 32-bit.
-
"d3d9_remix.dll not found" error
- Ensure RTX Remix's
d3d9.dllis renamed tod3d9_remix.dllin the game directory - Check
camera_proxy.logfor the exact paths being searched - Verify the Remix DLL matches your game's architecture (X64 game needs X64 Remix)
- Ensure RTX Remix's
-
Menu not appearing (F10)
- Check
camera_proxy.logfor ImGui initialization errors - Ensure the game has focus when pressing F10
- Try disabling fullscreen and using windowed mode
- Check
-
Game crashes on startup
- Verify architecture mismatch: X64 proxy with X86 game or vice versa
- Check that
d3d9_remix.dllexists and is valid - Review
camera_proxy.logfor loading errors
-
Matrices not detected
- Enable
LogAllConstants=1incamera_proxy.ini - Use the Constants tab in the overlay to inspect shader uploads
- Try different game profiles or manual register overrides
- Enable
See camera_proxy.ini for complete comments and defaults. Commonly used keys:
- Runtime/output:
UseRemixRuntime,RemixDllName,EmitFixedFunctionTransforms - Detection:
AutoDetectMatrices,ProbeTransposedLayouts,ProbeInverseView - Register control:
ViewMatrixRegister,ProjMatrixRegister,WorldMatrixRegister - Profiles:
GameProfile - Fallbacks:
EnableCombinedMVP,ExperimentalCustomProjection* - UI/input:
ImGuiScalePercent,Hotkey* - Diagnostics:
EnableLogging,LogAllConstants
- mencelot (original DMC4 camera proxy basis)
- cobalticarus92 (camera-proxy project)