Closed veeenu closed 10 months ago
Something is almost working in this branch.
Progress report: here's a small demo of a DirectX 12 renderer overlaid on top of Dark Souls III's DirectX 11 surface.
Next attempt is trying this against different renderers -- DX9, OpenGL, Vulkan. WGPU has proven a bit difficult to work with in regards to handling transparency, but I'll give it another shot.
With no changes at all, the same library hooks successfully against a DirectX 12 game:
This suggests a method for detecting hook type could be feasible -- just using simple heuristics like check if a given DLL is loaded or not.
I am going to test against DX9 and OpenGL by replicating their hooks, and once I can confirm they work as well I will start a massive refactor.
Dark Souls (DX9) is a go. Had to change the Dx12 device to use D3D_FEATURE_LEVEL_11_1
at creation, but with that value Dark Souls III and Elden Ring still work.
A note: it is possible to block the game window from receiving messages by overlaying a transparent HWND on top of it, and selectively altering its WS_EX_TRANSPARENT
state. This could solve #79 finally
OpenGL confirmed! We can now support all existing renderers, and adding new ones is going to be almost trivial.
I want to run a small, isolated experiment: build a wgpu renderer, check if it can be run in parallel to a game's renderer, and use
BitBlt
or similar to overlay the surface.This would change the approach of
hudhook
to further reduce coupling, complexity, and maintainability effort: we could easily get rid of all the per-framework renderers, and get access to those for free when instantiating a hook.Benefits
egui
)Drawbacks
If the experiment proves successful, I will keep the current "legacy" renderers as-is for 0.6.0, and then remove them in 0.7.0 once enough people have had the chance to test it.