Cannot call ENB as a proxy library from 3D Vision/3Dmigoto

  • Author
  • Message
Offline
Posts: 3
Joined: 03 Feb 2018, 16:22

Re: Cannot call ENB as a proxy library from 3D Vision/3Dmigo

Qwinn wrote:Far as I can tell, bo3b's solution isn't a workaround, it's an actual fix. I'll check with him about that tho.
A little bit of both actually. This is a one-off build of 3Dmigoto for this particular problem, but should work fine in Skyrim and ENB indefinitely. The main change I made was to disable our DXGISwapChain hook altogether, so as to not interfere with ENB's. That does not disable the 3Dmigoto functionality, because the game use CreateDeviceAndSwapChain, not the Factory1 style creation.


Sorry for the delay coming back here, I always forget that the PHPforum sets notifications off by default.

Offline
Posts: 3
Joined: 03 Feb 2018, 16:22

Re: Cannot call ENB as a proxy library from 3D Vision/3Dmigo

ENBSeries wrote:Hope i understood everything well. Locking occurs because ENBSeries loading system library inside CreateDeviceAndSwapChain function call, right? If so, you can just add new condition to hooked LoadLibrary by Migoto, which is activated right before CreateDeviceAndSwapChain call to parse valid d3d11.dll to ENBSeries. After its done, restore to previous state of hooked LoadLibrary. Not 100% sure about very prehistoric versions of my mod (like 0.074), but most likely i never called LoadLibrary in dllmain, every version should be the same (except maybe d3d8 to d3d9 convertor). Probably this already done, but just in case...

As remember, in all more or less recent versions i exporting NvOptimusEnablement, so it can be used for easy detection if it's ENBSeries or some other library (d3dcompiler_46e.dll sometime ignored by users and not copied to game folder).
That is actually the fix I made to 3Dmigoto, I changed the LoadLibrary hook to be disabled when proxy loading is active. We only use that LoadLibraryHook to workaround game loading problems where the game specifically goes directly to System32, bypassing our wrap.

No need for it here, and as a general rule, if we are trying to use a proxy, that won't work if the game is doing something like that, so I think it's safe to always disable our hook when proxy is specified.
ENBSeries wrote:
However, I'm not seeing the ENB overlay in this setup, even though it's clear the code is being called.
Do you mean startup message of ENBSeries or editor? Start message in dx11 version use its own shader and font texture to draw strings, so maybe its shaders wrongly processed/patched by some reason. Or device states are modified (in such case better try to set something default). But if its editor do not work, then something inside AntTweak library code i suppose. Btw, if timer functions are hooked by Migoto, startup message may not occur.
No sorry, no message at all from ENB. Nothing on screen. No activation. I meant it was clear that the proxy was being loaded, because I could see the special d3dcompiler being loaded, but outside of that, no indication. That it was being loaded is important only in that shows the proxy load itself was successful.
ENBSeries wrote:
So, I wanted to see if there is anything obvious that would block ENB in this setup? Anything like noticing the shaders are patched and deciding not to run? If there is a log mechanism, I can take a look with that. Any suggestions here would be most welcome.
viewtopic.php?f=29&t=496&p=4266#p4266 Check out first post attachment in that topic, made a logged build for Fallout 4, which generate enbseries.log in game folder, but be careful it outputs almost all wrapped functions, so very slow. There is also log from Fallout4 terminated after first frame on startup to compare.
Why mod can fail. First of all, if Present is hooked with no return, of course before this function ENBSeries draw messages, fps, editor, read input, some clearing. When shaders not compiled by d3dcompiler library (if its hooked). When objects failed to create because of some weird initialization parameters of d3d, like no back buffer resolution which required as global variable for my own render targets. When device state is modified by "crapware" and not restored back, of course it just visual errors, mod almost always continue to work. Dont remember any other scenario when startup message do not occur.
OK, good to know, I'll try that logging version in this scenario with our Present hook active, and see what might be happening. I'll report back. Thanks.
Post Reply