crosire / d3d8to9

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

Ive asked before. But is there no way we can find out why AA doesn't work with the module? #63

Closed LethalManBoob closed 4 years ago

LethalManBoob commented 6 years ago

The games i play like serious sam benefit so heavily from aa that I really cannot go back just for more frames. Is there no way to log what is blocking it?

elishacloud commented 6 years ago

@LethalManBoob, I was able to get AntiAliasing to work using the AA feature dxwrapper while using d3d8to9. Check out the attached files: d3d8.zip

It does not work with all games but it does work with Serious Sam and Raymond 3 (which looks significantly better with AA!)

Also you can try out SMAA for other games that may not work with dxwrapper's AA.

LethalManBoob commented 6 years ago

Big issue here. AA wont work on serious sam the second encounter. It goes to d3d9 but no aa. I dont know exactly how to correctly install dxwrapper for serious sam. I need help. thanks.

Their tutorial didnt work for me.

elishacloud commented 6 years ago

Yes, the AA in dxwrapper is just trying to force AA on. Some games won't work if you force it on, so I fail gracefully and just disable AA to ensure the game still runs. Try SMAA. It should work even if dxwrapper does not.

LethalManBoob commented 6 years ago

"but it does work with Serious Sam"

This confuses me because it dosen't work on the first encounter ether.

it works with firestarter so i know im not doing anything wrong.

elishacloud commented 6 years ago

The issue with Serious Sam (both 1 & 2) is that it requires the backbuffer to be lockable, so this flag D3DPRESENTFLAG_LOCKABLE_BACKBUFFER cannot be disabled. However (as seen here) the D3DPRESENTFLAG_LOCKABLE_BACKBUFFER flag needs to be disabled before anti-aliasing will work.

Unless you can show me something that works without d3d8to9 that does not work with d3d8to9 then I recommend you close this issue. If you want anti-aliasing you can use SMAA. It does work with this game, I tested it.

LethalManBoob commented 6 years ago

Im very sure that XII (Ubisoft game/UE2) dosent work with d3d8tod3d9. When i last tried it a few months ago It didnt work. instant CTD.

elishacloud commented 6 years ago

I did a fix last night for AA. Attached is a fixed dll so that you can use AA with d3d8to9. Can you try with this: d3d8.zip

I tried several games with AA and d3d8to9 using this patched dll and they all worked for me. If that does not work can you give the exact steps you perform that are not working?

LethalManBoob commented 6 years ago

I just plop them both (the downloaded files) into the directory and thats it. They get converted to d3d9 but aa dosent work. Not on serious sam. not on firestarter. not on unreal 2.

I tried putting in dxwrapper and its ini in as well. I tried setting dxwrapper as well. nothing works.

Im talking MSAA btw, no post process methods. Specifically SGSSAA. I cant go back from 4xsgssaa to no aa or smaa.

elishacloud commented 6 years ago

The AA in dxwrapper has some limitations. It uses standard Direct3D9 MultiSampling a.k.a. Full-Scene Antialiasing (see here). There are two limitations to the standard Direct3D9 MultiSampling:

  1. It does not support locking the backbuffer. See my comments here.
  2. It only supports the SwapEffect discard (D3DSWAPEFFECT_DISCARD). See documentation here.

However there are games that require backbuffer locking or other swap effects. For example Serious Sam requires locking the backbuffer.

The SMAA listed above uses shading to do AA after the screen is drawn. This allows AA to work regardless of the backbuffer or the SwapEffect. I am planning to switch to this method later when I have time.

If you have other issues or want more data on dxwrapper please close this issue and open an issue on dxwrapper issues page. We want to keep this forum for d3d8to9 only.

BTW: for the "XII (Ubisoft game/UE2)" game mentioned above do you mean this game XIII?

LethalManBoob commented 6 years ago

Unless you are doing SMAA2TX or SMAAS2x (smaa supersampled with msaa) i wouldn't bother. It messes up text to use anything but, unless that can be avoided of course, in which case i wouldent mind, assuming it is of very high quality. I suppose you could attempt to force raw ssaa + smaa if that dosent require a buffer back lock, which is equally as good as SMAA S2x

Anyway no i don't have any issues with dxwrapper that dont already have here so i shant be discussing it further.

And yes i did mean XIII.

elishacloud commented 6 years ago

Comments from here:

Msaa still does not work with serious sam? Am I missing something? Through the nvidia drivers.

I tested with Serious Sam: The First Encounter. Without d3d8to9 then enabling MSAA via Nvidia Control Panel works fine. However with d3d8to9 enabling MSAA has no effect.

LethalManBoob commented 6 years ago

Great work. It now works perfectly on serious sam first encounter and firestarter. However the second encounter still yields no results.

elishacloud commented 4 years ago

However the second encounter still yields no results.

@LethalManBoob, I believe I found the issue. Try this update: d3d8.zip

LethalManBoob commented 4 years ago

However the second encounter still yields no results.

@LethalManBoob, I believe I found the issue. Try this update: d3d8.zip

I know this is odd. But I swear the issue had since been fixed at some point, but I cannot remember if it was, either way, this most certainly does fix the issue. Thanks.