Depth buffer detection modifications

More
2 years 5 months ago #921 by DonaldDuckling
Replied by DonaldDuckling on topic Depth buffer detection modifications
Hello, i was going to post about Journey, the depth buffer is offset?/depends on camera somehow.
But have a look at assassins creed 1 and 2, altair and close objects are moved from the preserved depth shader somehow, in dx9. dx10 does nor produce a usable depth. Altair appears in the loading screen.

this is the uplay version btw.
The topic has been locked.
More
2 years 5 months ago - 2 years 5 months ago #922 by thalixte
Replied by thalixte on topic Depth buffer detection modifications

Hello, i was going to post about Journey, the depth buffer is offset?/depends on camera somehow.
But have a look at assassins creed 1 and 2, altair and close objects are moved from the preserved depth shader somehow, in dx9. dx10 does nor produce a usable depth. Altair appears in the loading screen.

this is the uplay version btw.


Yes, i know. This is because the code included in the v4.30 does not include the fix for Assassin's Creed II.

Here are the dlls from the very last commit in the master Reshade fork (should work better with Assassin's Creed II, and maybe Assassin's Creed I - not tested):

Last Reshade dll (32 bits)mega.nz/#!a5BxAQpa!lLqr81eob49LJQ3V2pDUSapj_PjjCqgVxwOpOxIDvGc
Last Reshade dll (64 bits)mega.nz/#!zgI3najD!mjnmAtaybREhehNHKORKZTaRDmkBY34Vo16E7ufvq6w
Last edit: 2 years 5 months ago by thalixte.
The following user(s) said Thank You: DonaldDuckling
The topic has been locked.
More
2 years 5 months ago - 2 years 5 months ago #923 by thalixte
Replied by thalixte on topic Depth buffer detection modifications

Hi thalixte. i was playing with MXAO and the new RT shader in Stalker Clear SKy and Call of Prypiat and noticed a thing .

When you play in dx9 mode everything is fine, but when you are in dx10 or dx11 mode, mxao and RT produce a lot of ghosting. It's not usual ghosting like in other games, i am pretty sure it has something to do with depth buffer. Can you investigate it ? The only way i found is to reduce the amount of the effects, but i was wondering if you could do something. Thank you.


I have found that, in some DX10 games where db detection worked perfectly (without the need to use the "Copy depth before clearing") in v3.3.2, the standard depth buffer detection does not work anymore (Crysis dx10, Stalker Clear Sky DX10...). I just made a fix for it.
Here are the fixed dlls:

dxgi_fix_dx10_32bits.zipmega.nz/#!75JmkCgI!0UV24zeBzbgnaZHf7PmVrozjDmogQ1l0HIRh38p1Oos
dxgi_fix_dx10_64bits.zipmega.nz/#!XtBkSSaA!q_yqVb9rtOxy_RnC7T6Rn9OD-zbjRlle4zLJJwgHOa8

So, in Stalker, you should access the depth buffer without enabling the "Copy depth before clearing" mode.
Just tested on Stalker Clear Sky, in DX10 mode, with those settings:

Reshade.ini:
PreprocessorDefinitions=RESHADE_DEPTH_LINEARIZATION_FAR_PLANE=1000.0,RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN=0,RESHADE_DEPTH_INPUT_IS_REVERSED=0,RESHADE_DEPTH_INPUT_IS_LOGARITHMIC=0
...
[DX10_BUFFER_DETECTION]
DepthBufferRetrievalMode=0
DepthBufferTextureFormat=0
ExtendedDepthBufferDetection=0
DepthBufferClearingNumber=0

I do not know if it resolve your ghosting issues, as i do not understand where is the pb. Maybe is it due to motion blur, or something else...
With RT shader enabled, i have some ghost trails, but it seems to be linked to the shader itself, as in the DisplayDepth shader, those trails do not appear.
Last edit: 2 years 5 months ago by thalixte.
The following user(s) said Thank You: Laitauriz, Morg3nst3rn, Lost Alpha
The topic has been locked.
More
2 years 5 months ago - 2 years 5 months ago #924 by lowenz
Replied by lowenz on topic Depth buffer detection modifications
Some minor problems in War in the North (this game need fixes SO BAD, like Arcania.....and it's a good LOTR-themed game! Gameplay and narrative-wise good but so badly held together technically :/ )

No fix solves this sunshafts bleeding through the WHOLE scene (from the distance too, maybe they add up?):

File Attachment:


File Attachment:
Last edit: 2 years 5 months ago by lowenz.
The topic has been locked.
More
2 years 5 months ago #925 by Laitauriz
Replied by Laitauriz on topic Depth buffer detection modifications
Thanks Thalixte. It worked like a charm!
The topic has been locked.
More
2 years 5 months ago - 2 years 5 months ago #926 by Pat_s2
Replied by Pat_s2 on topic Depth buffer detection modifications
thalixte I can confirm the 64bit dll you uploaded does indeed work for crysis dx10. what did you change? Thank you for your time btw, helping everybody on here.
Last edit: 2 years 5 months ago by Pat_s2.
The topic has been locked.
More
2 years 5 months ago - 2 years 5 months ago #927 by thalixte
Replied by thalixte on topic Depth buffer detection modifications

Thanks Thalixte. It worked like a charm!

thalixte I can confirm the 64bit dll you uploaded does indeed work for crysis dx10. what did you change? Thank you for your time btw, helping everybody on here.


Cool :). You can see the changed i made for the fix in the pull request on github: github.com/crosire/reshade/pull/129
Last edit: 2 years 5 months ago by thalixte.
The topic has been locked.
More
2 years 5 months ago #928 by WSH303
Replied by WSH303 on topic Depth buffer detection modifications
Just to let you know. It seems depth access for Witcher 1 works fine now, both interiors and exteriors :)
The topic has been locked.
More
2 years 5 months ago #929 by Jesped
Replied by Jesped on topic Depth buffer detection modifications
There is a problem with losing Depth detection in Assetto Corsa Competizione, explained in detail here: reshade.me/forum/troubleshooting/5500-de...o-corsa-competizione

Any idea how to fix that?
The topic has been locked.
More
2 years 5 months ago #930 by thalixte
Replied by thalixte on topic Depth buffer detection modifications

There is a problem with losing Depth detection in Assetto Corsa Competizione, explained in detail here: reshade.me/forum/troubleshooting/5500-de...o-corsa-competizione

Any idea how to fix that?


I suggest you to tick the "Copy depth before clearing" checkbox, and see if you have to select a specific clearing instance.
The topic has been locked.
More
2 years 5 months ago #931 by Morg3nst3rn
Replied by Morg3nst3rn on topic Depth buffer detection modifications
Hello there thalixte,
i just want to say thank you and i can confirm, that your your fix/modification resolved an issue i had in American Truck Simulator with dx11 ! ;)
I made a short clip 3 days ago, where i had Problems with vanishing Depth Buffers i guess. :huh: I noticed it when i tried Mxao in dx11, as you can see in the following link


Best regards
Morg3nst3rn
The topic has been locked.
More
2 years 5 months ago #932 by thalixte
Replied by thalixte on topic Depth buffer detection modifications
Hello :)

What happens if you untick "extended depth buffer detection" checkbox ?
The topic has been locked.
More
2 years 5 months ago - 2 years 5 months ago #933 by v00d00m4n
Replied by v00d00m4n on topic Depth buffer detection modifications
Man, can you do something about games that used multiply depth buffers at same time? For example Heavy Rain (get the demo in epic shit store) if screwed whenever game shows split screen with several cameras focusing on 2 characters Reshade uses only one buffere and does not scale it according to scene geometry, but instead stretching it up to full screen. Such game needs special case scenario workaround.

I also saw few games that uses separate depth buffers for levels and characters applied as sort of overlay, dont remember which game it was, maybe some lego game, not sure, but what im sure about that in such cases Reshade needs to have ability to use 2 or more checked buffers and merge them into one by using white or black key color as transparency, and with ability to set order - which buffer is above and which one is bellow.

There is also another case where different buffers needed - in some games different levels and scenes uses different depth buffers and other buffers became unavailable, so in one place one buffer works, in another place its another buffer, back to previous place you get to previous buffer. For this case to solve it Reshade need to have ability to memorise all checked buffer (and store in configs their hashnames) and switch between them if some uavailable or attempt to mix them (this should better has another option switch if we want to mix manually checked buffers or switch to any of them is others unaivalable). I think same heavy rain did this weird thing few times.

Also some games using fixed size of buffers which could be easy way to detect them, we need to have filter box where we can strict resolution of buffer to filter anything else, or can set if it should be <> than some value (so we need some box with logical operator in front and after value).

Another special case that needs to be handled - GUI.
There needs to be another row of checkboxes that would tell Reshade that this exact buffer is GUI and set above main game bufers, so that Reshade could cut this place out of processingby using such buffer as alpha\key or as frontal depth. Yet again it should combine with everything above because there could be several separate GUI buffers used all the weird ways. This would actually solve long lasting issue where effects got applied over gui elements (but they are usually boxes so some texture alpha detection in this buffered would be needed to get more precise shape, some basic edge detection could help as well to cut more precise zone inside polygonal GUI buffer) which is mostly annoying in case of ambient occlusion and dof shaders.


And yeah, many single player games using internet traffics for stats, usage data, and some other non really MP stuff, yet lame old reshade's anti-cheat consider it as MP and once some traffic active it just disables depth, which needs to be turned off and should be configurable per user not enforced for everyone. The most noticeable example of SP game where such fuck up happens is NIER AUTOMATE, it uses network traffic to get some coords for corpses, and at this poin depths get disable often. Knowing now how EA games always send analytics data to force players into microtransactions in SP games and how every game now has community features like leaderboards, some user content exchange and so on - this depth disable on network traffic is no brainer.

I always was against it and said many times to crosier that its overkill and that nobody will use Reshade for cheating because ability is very limited, even with depth buffer you cant do wall hack and see through something, because it effectively would be covered by walls, you cant autoaim, cant even disgtinguish player from other moving objects to highlight it, so it will be a garbage motion detected that will basically react on every move of camera, and Reshade is easily detectable and using it for cheating (which is barely possible due of all imitations without game specific data which Reshade cant get) is suicide for every cheater, so nobody would ever use it for cheats, as Reshade is pretty shitty and disfunctions for cheating purposes, and some paniceurs in early discussions of Reshade feature just infected Crosire with this unjustified fear of Reshade users being banned by every anticheat if depth buffere will be available (which would not happen, I tested custom build with depth turned on on MSAA and network traffic in several VAC protected games on test account, and after 2 years since 1st tests no VAC ban was issues despite I played with Reshade effects and depth buffer enabled for DOF and Ambient Occlusion so this fear unjustified, but those custom builds not whitelisted like official in more strict anticheats like EAC, which will surely whitelist official Reshade if asked even with depthbuffer access).

Maybe you cant help me to convince him to remove this unnecessary limitation and let us finally play with depth buffer in every game that sends and receives network packets? Also I dont even get why it get disabled on MSAA, played several games with MSAA and its buffer was ok. Even same Heavy rain demo does work fine with MSAA, which for some reason does not get detected by Reshade, but anyway this limitation also should be removed.

Lets Free the depth for all games and people, viva la depth buffer revolution! XD
Last edit: 2 years 5 months ago by v00d00m4n.
The following user(s) said Thank You: someone_for
The topic has been locked.
More
2 years 5 months ago #934 by Morg3nst3rn
Replied by Morg3nst3rn on topic Depth buffer detection modifications

Hello :)

What happens if you untick "extended depth buffer detection" checkbox ?


Before i tried your fix, there wasn´t any chance to get it *occasional* working without extended depth buffer detection at all.
My english isn´t good enough to describe the Details, so i just made a vid of it...FYI ;)
The following user(s) said Thank You: nit
The topic has been locked.
More
2 years 5 months ago #935 by iTest
Replied by iTest on topic Depth buffer detection modifications
Is it possible to fix it somehow? :)

The topic has been locked.
More
2 years 5 months ago #936 by DonaldDuckling
Replied by DonaldDuckling on topic Depth buffer detection modifications
@thalixte thank you for all your work. for ac1 it is still the same or no reshade at all even.
but my question is:

How do you get acces to doom 3's bfg depth buffer? on the compat list it says perfect but i get nothing.
The topic has been locked.
More
2 years 5 months ago - 2 years 5 months ago #937 by Jesped
Replied by Jesped on topic Depth buffer detection modifications

I suggest you to tick the "Copy depth before clearing" checkbox, and see if you have to select a specific clearing instance.


Nothing is listed if I do that. :huh:
Last edit: 2 years 5 months ago by Jesped.
The topic has been locked.
More
2 years 5 months ago - 2 years 5 months ago #938 by x8009
Replied by x8009 on topic Depth buffer detection modifications

Hi thalixte. i was playing with MXAO and the new RT shader in Stalker Clear SKy and Call of Prypiat and noticed a thing .

When you play in dx9 mode everything is fine, but when you are in dx10 or dx11 mode, mxao and RT produce a lot of ghosting. It's not usual ghosting like in other games, i am pretty sure it has something to do with depth buffer. Can you investigate it ? The only way i found is to reduce the amount of the effects, but i was wondering if you could do something. Thank you.


I have found that, in some DX10 games where db detection worked perfectly (without the need to use the "Copy depth before clearing") in v3.3.2, the standard depth buffer detection does not work anymore (Crysis dx10, Stalker Clear Sky DX10...). I just made a fix for it.
Here are the fixed dlls:

dxgi_fix_dx10_32bits.zipmega.nz/#!75JmkCgI!0UV24zeBzbgnaZHf7PmVrozjDmogQ1l0HIRh38p1Oos
dxgi_fix_dx10_64bits.zipmega.nz/#!XtBkSSaA!q_yqVb9rtOxy_RnC7T6Rn9OD-zbjRlle4zLJJwgHOa8

So, in Stalker, you should access the depth buffer without enabling the "Copy depth before clearing" mode.
Just tested on Stalker Clear Sky, in DX10 mode, with those settings:

Reshade.ini:
PreprocessorDefinitions=RESHADE_DEPTH_LINEARIZATION_FAR_PLANE=1000.0,RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN=0,RESHADE_DEPTH_INPUT_IS_REVERSED=0,RESHADE_DEPTH_INPUT_IS_LOGARITHMIC=0
...
[DX10_BUFFER_DETECTION]
DepthBufferRetrievalMode=0
DepthBufferTextureFormat=0
ExtendedDepthBufferDetection=0
DepthBufferClearingNumber=0

I do not know if it resolve your ghosting issues, as i do not understand where is the pb. Maybe is it due to motion blur, or something else...
With RT shader enabled, i have some ghost trails, but it seems to be linked to the shader itself, as in the DisplayDepth shader, those trails do not appear.


Hi , I have the same issue with Clear and the ghost issue in 2 other games.

NFS Payback
BladeStorm Nightmare

When using the clear it causing this weird black ghost issue.
If I don't use the clear on NFS Payback with SuperDepth Shader enabled only, causing some weird depth buffer mixed up, until I click the reshade Reload button and then it is fixed. if I load the game with the Clear checkbox, there is no issue with the weird buffer mixed up but there is the ghost issue.
This happens with 4.3.0

I checked 3.0.4 and it doesn't have the issue, also 3.4.1 doesn't.


UPDATE :::::HM I think the issue is with PBO Bloom .. as soon I enabled it, it started to problem.

If I have PBO Bloom enabled with Superdepth before going in the game it causing the depth buffer issue. if I enable it after or do reload after it loaded with it enabled it fix the issue.

This is what it looks like with PBO Bloom as soon as I enter the game. Superdepth + PBO Bloom


When I do reload this is how it looks like, there shouldn't be depth buffer at this point, only after, so it' something that loads incorrectly and keeps going over all way



This when I alt tab after the first loading screen



This is after I click Reload

Last edit: 2 years 5 months ago by x8009.
The topic has been locked.
More
2 years 5 months ago - 2 years 4 months ago #939 by thalixte
Replied by thalixte on topic Depth buffer detection modifications
@v00d00m4n, @x8009, @iTest, @Morg3nst3rn, @Jesped...
I apologize i did no make an answer for you requets, but i am currently working on the depth buffer detection for DX12 games.

Here is the dll (both in dxgi.dll and d3d11.dll for compatibility purpose).
d3d12_64bits .zipmega.nz/#!voxSXYiB!MteIx67IJFqq23WK4ZEfFs-HH30TB1fFFZpLrzmP5Fs

I only tested it on Metro Exodus. Feel free to test it on another DX12 game. ;)

File Attachment:


File Attachment:
Last edit: 2 years 4 months ago by thalixte.
The following user(s) said Thank You: BlueSkyKnight, Jesped, iTest
The topic has been locked.
More
2 years 5 months ago - 2 years 5 months ago #940 by BlueSkyKnight
Replied by BlueSkyKnight on topic Depth buffer detection modifications
Thank you for sharing what your working on.

DX12 Games Tested with AMD RX 580
1. Strange Brigade DX12 mode. No Depth Buffer.
2. Shadow of the TombRaider seems to Hang in the start screen. I think depth buffer detection works. here
3. Deus Ex: Mankind Divided DX12. Grabs wrong Depth Buffer.
4. Warhammer: Vermintide 2 crash on loading. Tested in modded realm DX12
Last edit: 2 years 5 months ago by BlueSkyKnight.
The following user(s) said Thank You: x8009
The topic has been locked.