crosire / d3d8to9

A D3D8 pseudo-driver which converts API calls and bytecode shaders to equivalent D3D9 ones.
BSD 2-Clause "Simplified" License
927 stars 83 forks source link

Edit: Very dark bushes in the game (DirectX 8 & 9) #105

Closed Skajdrowski closed 1 month ago

Skajdrowski commented 4 years ago

I want simple answer, yes or no. If yes, could you make that for us ? I wanna know what will happen if I'll run DX 8 game on DX 10 resources :)

elishacloud commented 4 years ago

Yes, it is possible, but the architecture changed after DirectX 9 so converting from DirectX 8 to other versions of DirectX usually requires adding some type of emulation layer. Whereas d3d8to9 is just is a straight conversion from DirectX 8 to DirectX 9. This means d3d8to9 should be faster and more compatible than converting to a higher version of DirectX.

Also most tools, like ReShade support DirectX 9 or newer. So getting the game up to at least DirectX 9 opens up a world of tools that don't exist with DirectX 8.

Plus, there are already tools out there that convert the game to newer versions:

Skajdrowski commented 4 years ago

So I just need to drag all of the required dlls to a game like with d3d8tod3d9 ?

Edit: I managed to get the dxvk work, but I have one more question, I have very dark bushes in the game, even on it's native DirectX. I tried to play it on d3d9, d3d11 and even on vulcan but it doesn't solve this issue. I attached the screenshot how it looks like + log file SniperElite_d3d9.log

Desktop Screenshot 2019 12 17 - 21 36 05 92

elishacloud commented 4 years ago

From the logs it looks like the game is using surface format D3DFMT_W11V11U10. It looks like dxvk does not support the format, and maybe your computer does not support the format either.

Without looking into this at all, my guess is that the trees use this format and since the format is not supported, they just show up as black. Most likely we would need to build emulation for that format, but I don't think we plan to do that in this project.

The issue may be similar to this issue specified here.

Note: this format appears to be specific to DirectX 8, or at least it is not supported in DirectX 9.

Skajdrowski commented 4 years ago

I don't really know what's going on in that linked thread. I really don't like when something is being broken so I'm trying to fix that without knowledge. Is there any fix to that render bug ? I don't want to dual-boot windows xp specially for few old games :(

elishacloud commented 4 years ago

What game are you trying to get working on Windows 10? If I can get a copy of the game I can try and look into this when I get a chance.

You could also try dgVoodoo2. It might be using emulation to support this format.

Skajdrowski commented 4 years ago

The game I'm running is called ,,Sniper Elite Berlin 1945" Here is a steam page: https://store.steampowered.com/app/3700/Sniper_Elite/?l=english

and also I was trying dgVoodoo2, but it doesn't seems to fix that

Skajdrowski commented 4 years ago

@elishacloud Still no way to get it fixed ? I can provide you my GoG installator if you want

elishacloud commented 4 years ago

Thanks! I already own this game, but I have never played it. Based on this comment from a lead developer at Microsoft on the DirectX team, format D3DFMT_W11V11U10 has been dropped on DirectX 9. This is the issue here.

I think I can use another texture format and then convert the data, but I have not had much time to look into this. Can you tell me how to reproduce the issue?

Skajdrowski commented 4 years ago

@elishacloud Oh I forgot that this thread still exists :D

The issue just occurs on newer Windows versions (7, 8.1 & 10) I guess

This game natively supports DirectX 8 but the bushes still remained Dark, I tried putting d3d8to9 into the game and even emulate newer DirectX versions and it still didn't had fixed these bushes.

Skajdrowski commented 1 month ago

Apparently, this glitch doesn't happen on GOG version of the game.