d3d8to9

  • Posts: 3740
5 years 3 months ago - 1 year 2 months ago #1 by crosire
ReShade's Direct3D8 to Direct3D9 component, a pseudo-driver module that intends to improve compatibility and stability in games using Direct3D8 for rendering by converting all API calls and lowlevel shaders to equivalent Direct3D9 ones, is now open source under the terms of the BSD 2-clause license.

I decided to go down this route in the hope for it being useful to the community and to improve it together, since it's still one of the most problematic parts of ReShade. Any contributions to the project are highly welcomed =).

Source: github.com/crosire/d3d8to9
Download: github.com/crosire/d3d8to9/releases
The following user(s) said Thank You: JPulowski, Wicked Sick, Alex_outer, padolamap, BillyAlt, brussell, Ganossa, jas01, TinchO, YOBA and 6 other people also said thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 530
5 years 3 months ago #2 by lowenz
Thanks man! We owe you so much for this!

Please Log in or Create an account to join the conversation.

  • Posts: 22
4 years 7 months ago #3 by ScarecrowDM
I must be blind or my google skills are failling me, but can you please link the binaries?
Thanks in advance!

Please Log in or Create an account to join the conversation.

  • Posts: 3740
4 years 7 months ago - 4 years 7 months ago #4 by crosire

ScarecrowDM wrote: I must be blind or my google skills are failling me, but can you please link the binaries?
Thanks in advance!

It's part of the ReShade binaries. A standalone binary is not provided, you would need to build it from source code if you want one.

Please Log in or Create an account to join the conversation.

  • Posts: 22
4 years 7 months ago - 4 years 7 months ago #5 by ScarecrowDM
I see.
I remember of previous versions being shared by CeeJay on Guru3D, but I realize now that maybe was a different thing.
I'm wanting to test some DX8 games under Wine using it.

No worries though, thanks for the reply!
I'll sure take a look on github later.

Please Log in or Create an account to join the conversation.

  • Posts: 530
4 years 6 months ago - 4 years 6 months ago #6 by lowenz

Please Log in or Create an account to join the conversation.

  • Posts: 6
4 years 4 months ago #7 by ScureHD
Any news on better DX8 to 9 conversion? No one used the sources?

Please Log in or Create an account to join the conversation.

  • Posts: 530
4 years 3 months ago #8 by lowenz
There's still a lot of work to do.
Same old Z-fighting issues with version 2.0.3 (dege found a way to solve this problem in dgvoodoo2, but dgvoodoo2 wrap to d3d10.1/d3d11 not d3d9):

File Attachment:

Please Log in or Create an account to join the conversation.

  • Posts: 530
4 years 3 months ago #9 by lowenz
Another bug (Chrome): see the tree shading issue just moving the mouse (camera) a little bit

File Attachment:

Please Log in or Create an account to join the conversation.

  • Posts: 3740
4 years 3 months ago #10 by crosire
The project is open source. Anybody is welcomed to send in changes. I personally don't have the time to continue, it works well enough for me.

Please Log in or Create an account to join the conversation.

  • Posts: 530
3 years 8 months ago - 3 years 8 months ago #11 by lowenz
Good news!

The *complete* DXSDK is not really needed.
This subset is enough: github.com/hrydgard/minidx9

You can simply
1) copy the "include" folder files in crosire project "source" folder
2) modify: #include <d3dx9shader.h> -> #include "d3dx9shader.h" (<> -> "")
3) copy the "lib\x86" folder files in crosire project root folder
4) retarget the solution to your SDK (mine is Win10SDK + MSVC 2015 CE)
5) compile&link and you're good to go!

Please Log in or Create an account to join the conversation.

  • Posts: 39
3 years 7 months ago - 3 years 7 months ago #12 by Devil Master
I just tried the Direct3D 8 to 9 wrapper with the GOG version of Red Faction 1, the PureFaction update, and of course, ReShade. It crashes with an error, saying it cannot find msvcp140.dll. I googled the name and discovered it's part of the Visual C++ redistributable for Visual Studio 2015. But the download page at the Microsoft site has 2 available versions: 32 bit and 64 bit. Which one is correct?

Please Log in or Create an account to join the conversation.

  • Posts: 3740
3 years 7 months ago #13 by crosire
32 bit. There are no 64 bit DirectX 8 games.

Please Log in or Create an account to join the conversation.

  • Posts: 39
3 years 7 months ago - 3 years 7 months ago #14 by Devil Master
Okay, I got it working. But does it grant ReShade access to the depth map?
I'm asking because I tried it with the SuperDepth3D.fx shader (to play Red Faction in stereoscopy) and all depth maps are either completely black or completely white, with no depth effect whatsoever (at most, the whole flat scene is pushed forward with white depth maps).

EDIT: maybe it's the game's fault The same thing (no access to depth maps) also happens with dgVoodoo.

Please Log in or Create an account to join the conversation.

  • Posts: 530
3 years 7 months ago #15 by lowenz
Downloaded and compiled the lastest version:

Pure D3D8:
File Attachment:


With the wrapper:
File Attachment:


!!!!!!!!!!!!

Please Log in or Create an account to join the conversation.

  • Posts: 530
3 years 7 months ago - 3 years 7 months ago #16 by lowenz
15.000 points of difference @1920x1080 with MSAA 4x and uncompressed textures.....it's awesome.
And the wrapper works really well in UT2004 (32 bit) too.

Please Log in or Create an account to join the conversation.

  • Posts: 530
3 years 6 months ago - 3 years 6 months ago #17 by lowenz
Lastest version with a GeForce 1050 Ti:

Pure D3D8:
File Attachment:


Crosire D3D8to9:
File Attachment:



The "no pixel shader" case shows an impressive gain with the wrapper and the pixel shader case (Nature) shows a perfect match in performance with the native Nvidia implementation.

Please Log in or Create an account to join the conversation.

  • Posts: 530
2 years 9 months ago #18 by lowenz
Tested the lastest (1.5) version.
Is there a way to disable the forced VSync ? (it seems so to me)
Maybe provide a simple options configuration file like others wrapper?

Please Log in or Create an account to join the conversation.

  • Posts: 3
1 year 2 months ago - 1 year 2 months ago #19 by tsilliev

crosire wrote: ReShade's Direct3D8 to Direct3D9 component,
Source: https://github.com/crosire/d3d8to9
Download: http://reshade.me/d3d8to9


download is page 404

Managed to download it from github, I open readme, no install info....,I just unpack at the game's dir, then pray and play?

Please Log in or Create an account to join the conversation.

  • Posts: 3740
1 year 2 months ago - 1 year 2 months ago #20 by crosire
Yes, it is pretty straight forward. The d3d8.dll has to be next to the game executable.

Please Log in or Create an account to join the conversation.