A proxy d3d9.dll for Lineage 2 clients based on Unreal Engine 2 / Direct3D 9.
Drop into the system folder — no installer, no runtime dependencies.
Configuration via d3d9_proxy.ini, created automatically on first run.
Tested on The 1st Throne: The Kamael. Compatible with other chronicles on the same engine.
Anisotropic filtering x16 + LOD bias
Forces AF on all samplers and sharpens mipmaps. Noticeably cleaner textures at close range without any post-processing.
FPS limiter
Post-Present sleep with ~0.1ms precision. Does not spin the CPU.
Fog override
Mode 1: full override — color and distances from INI.
Mode 2: keep game fog color, override distances only.
Frame latency
Calls IDirect3DDevice9Ex::SetMaximumFrameLatency(1) to reduce GPU queue depth. Lower input lag.
On Wine + DXVK always works. On native Windows depends on driver — some AMD drivers accept the call but ignore it.
Hotkey
RightAlt toggles all enhancements on/off at runtime. Window title shows current state.
| Feature | Windows | Linux — Gallium Nine | Linux — DXVK |
|---|---|---|---|
| AF x16 + LOD bias | ✅ | ✅ | ✅ |
| FPS limiter | ✅ | ✅ | ✅ |
| Fog override | ✅ | ✅ | ✅ |
| Frame latency | ✅ | ✅ |
- Copy
d3d9.dllinto the game'ssystemfolder (next tol2.exe) - Launch the game —
d3d9_proxy.iniis created automatically - Edit the INI to configure, restart to apply
Compatible with ReShade when loaded via opengl32.dll (standard UE2 setup — no naming conflict).
i686-w64-mingw32-g++ -shared -o d3d9.dll d3d9_l2.cpp \
-I/usr/i686-w64-mingw32/include \
-ldxguid \
-Wl,--enable-stdcall-fixup \
-Wl,--add-stdcall-alias \
-Wl,--kill-at \
-static-libgcc \
-static-libstdc++ \
-std=c++17i686-w64-mingw32-g++ -shared -o d3d9.dll d3d9_l2.cpp \
-ldxguid \
-Wl,--kill-at \
-static-libgcc \
-static-libstdc++ \
-std=c++17- Create a new DLL project (x86 / Win32)
- Add
d3d9_l2.cpp - Linker → Input → Additional Dependencies:
d3d9.lib,dxguid.lib - Build Release x86
Full IDirect3D9 / IDirect3DDevice9 vtable wrapper. All methods delegate to the real device. No external dependencies beyond system d3d9.
Implemented:
SetRenderState/SetSamplerState/Present/ResetinterceptionIDirect3DDevice9Exvia QI on the live device — not a separate wrapper. On DXVK always succeeds regardless ofCreateDevicetype. On native Windows may returnE_NOINTERFACEon older drivers; some AMD drivers accept but ignore. Both handled gracefully.- Render state detector: fog params, lighting state, sampler count, flare candidates — dumps to log on exit or hotkey
- Depth texture creation (
DF24/DF16/INTZ) probed at startup sampler_applycovers 8 samplers (detector recorded max 5 simultaneous in L2 Interlude)
Can be added on top:
- Draw call interception for geometry analysis
- Shader replacement via
CreatePixelShader/CreateVertexShader - HUD overlay via
DrawPrimitiveUPinEndScene - Depth buffer read (blocked on DXVK by design; works on Gallium Nine and native Windows)
- Frame timing stats, render target transition logging
Based on d3d9-depth-proxy. Key difference: IDirect3DDevice9Ex obtained via QI on the live device rather than a separate wrapper; sampler_apply covers 8 samplers instead of 16.