Depth buffer detection modifications
- DonaldDuckling
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.
- thalixte
- Topic Author
DonaldDuckling wrote: 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 |
- thalixte
- Topic Author
Laitauriz wrote: 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.zip | mega.nz/#!75JmkCgI!0UV24zeBzbgnaZHf7PmVrozjDmogQ1l0HIRh38p1Oos |
dxgi_fix_dx10_64bits.zip | mega.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.
- lowenz
No fix solves this sunshafts bleeding through the WHOLE scene (from the distance too, maybe they add up?):
- Laitauriz
- Pat_s2
- thalixte
- Topic Author
Laitauriz wrote: Thanks Thalixte. It worked like a charm!
Pat_s2 wrote: 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
- WSH303
- Jesped
Any idea how to fix that?
- thalixte
- Topic Author
Jesped wrote: 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.
- Morg3nst3rn
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. I noticed it when i tried Mxao in dx11, as you can see in the following link
Best regards
Morg3nst3rn
- thalixte
- Topic Author
What happens if you untick "extended depth buffer detection" checkbox ?
- v00d00m4n
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!
- Morg3nst3rn
thalixte wrote: 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
- iTest
- DonaldDuckling
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.
- Jesped
thalixte wrote: 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.
- x8009
thalixte wrote:
Laitauriz wrote: 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.zip mega.nz/#!75JmkCgI!0UV24zeBzbgnaZHf7PmVrozjDmogQ1l0HIRh38p1Oos dxgi_fix_dx10_64bits.zip mega.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
- thalixte
- Topic Author
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 .zip | [strike] mega.nz/#!voxSXYiB!MteIx67IJFqq23WK4ZEfFs-HH30TB1fFFZpLrzmP5Fs [/strike] |
I only tested it on Metro Exodus. Feel free to test it on another DX12 game.
- BlueSkyKnight
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