Welcome, Guest.
Username: Password: Remember me

TOPIC: Adding another wrapper as a proxy

Adding another wrapper as a proxy 1 year 9 months ago #1

Hello !

Currently I am trying to use "Reshade with SweetFX 2.0" AND "3DMigoto" (github.com/bo3b/3Dmigoto).
It's for Watch Dogs, to allow a "natural" SweetFX activation, while adding shaders replacers thanks to 3DMigoto wrapper (to erase object Highlighting and such).

I tried to add Reshade as a proxy of 3DMigoto but I got this kind of Error :
20/02/2015 05:35:54,392 | INFO  | Initializing Crosire's ReShade version '0.13.2.673' built on '2015-01-23 21:04:17' loaded from "D:\Jeux\Ubisoft Game Launcher\games\Watch_Dogs\bin\dxgi2.dll" to "D:\Jeux\Ubisoft Game Launcher\games\Watch_Dogs\bin\Watch_Dogs.exe" ...
20/02/2015 05:35:54,402 | INFO  | Registering hooks for "C:\WINDOWS\system32\d3d8.dll" ...
20/02/2015 05:35:54,402 | INFO  | > Delayed.
20/02/2015 05:35:54,402 | INFO  | Registering hooks for "C:\WINDOWS\system32\d3d9.dll" ...
20/02/2015 05:35:54,402 | INFO  | > Libraries loaded.
20/02/2015 05:35:54,402 | INFO  | > Found 9 match(es). Installing ...
20/02/2015 05:35:54,446 | INFO  | > Installed 9 hook(s).
20/02/2015 05:35:54,446 | INFO  | Registering hooks for "C:\WINDOWS\system32\d3d10.dll" ...
20/02/2015 05:35:54,446 | INFO  | > Delayed.
20/02/2015 05:35:54,446 | INFO  | Registering hooks for "C:\WINDOWS\system32\d3d10_1.dll" ...
20/02/2015 05:35:54,446 | INFO  | > Delayed.
20/02/2015 05:35:54,446 | INFO  | Registering hooks for "C:\WINDOWS\system32\d3d11.dll" ...
20/02/2015 05:35:54,446 | INFO  | > Delayed.
20/02/2015 05:35:54,446 | INFO  | Registering hooks for "C:\WINDOWS\system32\dxgi.dll" ...
20/02/2015 05:35:54,446 | INFO  | > Libraries loaded.
20/02/2015 05:35:54,447 | INFO  | > Found 3 match(es). Installing ...
20/02/2015 05:35:54,461 | INFO  | > Installed 3 hook(s).
20/02/2015 05:35:54,461 | INFO  | Registering hooks for "C:\WINDOWS\system32\opengl32.dll" ...
20/02/2015 05:35:54,461 | INFO  | > Libraries loaded.
20/02/2015 05:35:54,463 | INFO  | > Found 360 match(es). Installing ...
20/02/2015 05:35:56,203 | INFO  | > Installed 360 hook(s).
20/02/2015 05:35:56,203 | INFO  | Registering hooks for "C:\WINDOWS\system32\ws2_32.dll" ...
20/02/2015 05:35:56,203 | INFO  | > Libraries loaded.
20/02/2015 05:35:56,205 | INFO  | > Found 8 match(es). Installing ...
20/02/2015 05:35:56,246 | INFO  | > Installed 8 hook(s).
20/02/2015 05:35:56,246 | INFO  | Initialized.
20/02/2015 05:35:56,246 | INFO  | Redirecting 'D3D11CreateDevice(000000001411B060, 0, 0000000000000000, 32, 000000000106F108, 1, 7, 000000000106F088, 000000000106F588, 000000000106F080)' ...
20/02/2015 05:35:56,246 | INFO  | > Passing on to 'D3D11CreateDeviceAndSwapChain':
20/02/2015 05:35:56,246 | INFO  | Redirecting 'D3D11CreateDeviceAndSwapChain(000000001411B060, 0, 0000000000000000, 32, 000000000106F108, 1, 7, 0000000000000000, 0000000000000000, 000000000106F088, 000000000106F588, 000000000106F080)' ...
20/02/2015 05:35:56,246 | ERROR | Unable to resolve hook for '0x00007FFF95394D50'!

Is it possible to add an option in "ReShade_settings.txt" ?
The administrator has disabled public write access.

Adding another wrapper as a proxy 1 year 9 months ago #2

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2437
  • Thank you received: 1384
That's not easily implementable in case of ReShade unfortunately, see reshade.me/forum/shader-troubleshooting/...ct-how?start=12#1344.

And it's probably up to impossible for 3DMigoto, simply because both ReShade and 3DMigoto overwrite the same D3D11 functions. In case of D3D9 it's usually enough to just wrap calls through exports, which is why multiple injectors can be used, but for D3D11 one does wrap DXGI and D3D11 is hooked separatly, which then causes conflicts. While most injectors for D3D11 don't actually hook D3D11, only DXGI, 3DMigoto does, which crashes ReShades hooking and results in that error. =)
Cheers, crosire =)
Last Edit: 1 year 9 months ago by crosire.
The administrator has disabled public write access.

Adding another wrapper as a proxy 1 year 9 months ago #3

Thank you for the reply !

In this case I am not using MasterEffect. Just SweetFX.

Why is it working using Radeon Pro ?
I can make it working this way (for me) but I wanted to make something universal for other users.
The administrator has disabled public write access.

Adding another wrapper as a proxy 1 year 9 months ago #4

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2437
  • Thank you received: 1384
RadeonPro only hooks DXGI, not D3D11 directly. But ReShade requires to hook D3D11 to allow its advanced feautures, like depthbuffer access.
And using MasterEffect or SweetFX with ReShade doesn't matter, ReShade is ReShade. =)
Cheers, crosire =)
The administrator has disabled public write access.

Adding another wrapper as a proxy 1 year 9 months ago #5

  • ZoraSWE
  • ZoraSWE's Avatar
  • Offline
  • Posts: 5
  • Thank you received: 1
I saw somewhere on the forums an #include in the ReShade settings which enabled another library to load, but I can't find the original post.
The administrator has disabled public write access.

Adding another wrapper as a proxy 1 year 9 months ago #6

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2437
  • Thank you received: 1384
ZoraSWE wrote:
I saw somewhere on the forums an #include in the ReShade settings which enabled another library to load, but I can't find the original post.
That's about using different shaders together, not proxying multiple injectors. =)
Cheers, crosire =)
Last Edit: 1 year 9 months ago by crosire.
The administrator has disabled public write access.

Adding another wrapper as a proxy 1 year 9 months ago #7

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2437
  • Thank you received: 1384
What one can do to get around this is to inject ReShade via an injector tool instead of wrapping. Just pickup a tool like ENBInjector, configure it to inject the ReShade DLL and done, ReShade understands that too and you are now free to use another wrapper DLL.
Cheers, crosire =)
The administrator has disabled public write access.

Adding another wrapper as a proxy 1 year 9 months ago #8

  • JPulowski
  • JPulowski's Avatar
  • Offline
  • Posts: 92
  • Thank you received: 86
crosire wrote:
What one can do to get around this is to inject ReShade via an injector tool instead of wrapping. Just pickup a tool like ENBInjector, configure it to inject the ReShade DLL and done, ReShade understands that too and you are now free to use another wrapper DLL.
Unfortunately this method doesn't work for Beyond Good & Evil. I am using the Widescreen fix d3d9 wrapper then try to inject ReShade32.dll with ENB Injector. But only the widescreen fix libraries get injected. Widescreen fix has the following files in the executable directory:
d3d9.dll
d3d9.ini

Tracelog
The administrator has disabled public write access.

Adding another wrapper as a proxy 1 year 8 months ago #9

  • kgonepostl
  • kgonepostl's Avatar
  • Offline
  • Posts: 82
  • Thank you received: 4
crosire wrote:
What one can do to get around this is to inject ReShade via an injector tool instead of wrapping. Just pickup a tool like ENBInjector, configure it to inject the ReShade DLL and done, ReShade understands that too and you are now free to use another wrapper DLL.

What would be the downsides (if any) of using this method? You've caught my attention!
The administrator has disabled public write access.

Adding another wrapper as a proxy 1 year 8 months ago #10

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2437
  • Thank you received: 1384
kgonepostl wrote:
What would be the downsides (if any) of using this method? You've caught my attention!
Well, you have to launch the injector app everytime you want to play your game, so more work. There shouldn't be any more downsides apart from that.
Cheers, crosire =)
The administrator has disabled public write access.

Adding another wrapper as a proxy 1 year 6 months ago #11

  • v00d00m4n
  • v00d00m4n's Avatar
  • Offline
  • Posts: 44
  • Thank you received: 3
please add chain load of another dlls with relative and absolute path support.

Its really very simple thing to do:

1) read reshade.fx for

#define proxy_name = "path" (proxy_d3d8 proxy_opengl32 proxy_dsound or whatever the name of library reshade usese, also non hardcoded dynamic name would be great to load some other dlls and reroute game from original to modified)

2) split proxy_name by _ delimiter use 2nd part of string as name for replaced dll ( d3d9 or opengl32

3) set variable like

$name_proxy_path (d3d8_path dxgi_path)


4) add few little if then elses for each dll
if $name_proxy_path is defined
(
define $name = $name_proxy_path ( "enbd3d9.dll" or "moddlls\d3d9.dll" or "dpfix.dll" etc)
)
else
(
define $name = $name_system_path (system dll path)
)

5) Everywhere where you have path to system dlls just replace hardcoded patch with that $name and chain loading is ready to be used.

Its a fix that will take no longer than 10 minutes of your time. Please do it! There are many game fixes that pretend as d3d9 or other libs like that, and they unfortunately cant load anything after them, so there is no way combine them with reshade until reshade will allow to load them in renamed form (sometimes it does not work and some fixes need original dll name, in this case keeping name and placing them in subfolder should work if previous dll can load it from folder and set working dir properly to oirginal one, not a sub folder)

For example i was going to use reshade in combo with helixmod and dpfix in Deadly Premonition.

Dpfix which is d3d9.dll does not chain load anything, it should be last in order and game totally needs it. Helix load other dlls without problems and i need it to fix internal game shader by dumping and reinjectin them back in fixed form. So game loads Helix>DPFIX like d3d9.dll>dpfix.dll and there is no room for reshade, because without chainload it would be only possible to use reshade only, or helix>reshade but no dpfix.

Oh by the way until i forgot that - reshade crashing or not working properly if its loaded as 2nd dll without name of exact api used, so for example d3d9.dll as reshade name - works, d3d9.dll (helix) > reshade32.dll does not, but d3d9 > Reshade\d3d9.dll does work (yep to solve this issue i have to create subfolder and load reashade with actual api name dll and that not an option for all cases because some dlls does not allow to proxy chain from subfolders).
In addition to adding simple chain load feature into reshade you really have to review and fix the code that detects api in use by reshade dll name, to allow names like reshade32.dll loaded from previous proxy to work as you cant keep api name of dll in some cases.

please fix this ^_^
The administrator has disabled public write access.

Adding another wrapper as a proxy 1 year 6 months ago #12

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2437
  • Thank you received: 1384
No, it's not easy and I think I explained multiple times now why that is. The crash when the name of the DLL is not of the API is one of expressions, that's just how the ReShade hooking system works.
Cheers, crosire =)
The administrator has disabled public write access.

Adding another wrapper as a proxy 1 year 6 months ago #13

  • v00d00m4n
  • v00d00m4n's Avatar
  • Offline
  • Posts: 44
  • Thank you received: 3
Sorry, have not found any explanation in this thread why such usually easy thing is not that easy anymore. Care to point me to thread where it was explained? Anyway, easy or not - this feature is a must for many problematic games that rely on other proxy dlls for fixes. Please implement it as soon as possible.
The administrator has disabled public write access.