Depth buffer detection modifications

  • lowenz
More
6 years 6 days ago #341 by lowenz Replied by lowenz on topic Depth buffer detection modifications

thalixte wrote:

lowenz wrote:

thalixte wrote:

lowenz wrote: No way to tackle the issue?

In some initial releases of your implementation of RS you can retrieve DB with the shadows enabled, but only partially (some parts with "Third", some others with "Fourth" depending on the scene/level.


Hmmm. The dxd11 implementation has not changed since a long time. This could be the shadow map that were retrieved in the third or fourth clearing pass, but if it was the case, we should retrieve the depth map at the first or second pass...

Maybe it was First/Second, and I remember wrong (probably).
The thing I remember clearly is that some levels/some parts of the same level got MXAO alternatively working.


Ok. On this levels, when you disable shadows, does it work flawlessly ?

Yes! (Jensen apartment)
The topic has been locked.
  • jminternelia
More
6 years 6 days ago #342 by jminternelia Replied by jminternelia on topic Depth buffer detection modifications

thalixte wrote: Ok. On this levels, when you disable shadows, does it work flawlessly ?


Yes, 100% working without shadows!

[DEPTH_BUFFER_DETECTION]
DepthBufferRetrievalMode=1
DepthBufferClearingNumber=1
DepthBufferTextureFormat=0

Great find!
The topic has been locked.
  • DeMondo
More
6 years 6 days ago - 6 years 6 days ago #343 by DeMondo Replied by DeMondo on topic Depth buffer detection modifications
Settings overview list - Depth Buffer Detection Modification [ wip / updated April 14, 2018 ]:

Aarklash: Legacy:
DepthBufferClearingNumber = None
DepthBufferClearingFlagNumber = 2

Alien Rage - Unlimited:
DepthBufferClearingNumber = None
DepthBufferClearingFlagNumber = 6

Assetto Corsa:
[DEPTH_BUFFER_DETECTION]
DepthBufferRetrievalMode=1
DepthBufferClearingNumber=1
DepthBufferTextureFormat=0

Batman: Arkham Asylum:
DepthBufferClearingNumber = None
DepthBufferClearingFlagNumber = 6

Bioshock 2 remastered:
?

Deadfall Adventures:
DepthBufferClearingNumber = None
DepthBufferClearingFlagNumber = 5

Deus Ex: Human Revolution:
disable shadows - DX11

[DEPTH_BUFFER_DETECTION]
DepthBufferRetrievalMode=1
DepthBufferClearingNumber=1
DepthBufferTextureFormat=0

new settings:
PreprocessorDefinitions=RESHADE_DEPTH_LINEARIZATION_FAR_PLANE=75,RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN=0,RESHADE_DEPTH_INPUT_IS_REVERSED=0,RESHADE_DEPTH_INPUT_IS_LOGARITHMIC=1

[DEPTH_BUFFER_DETECTION]
DepthBufferRetrievalMode=1
DepthBufferClearingNumber=0
DepthBufferTextureFormat=44

Dishonored:
?

Divinity II: Developer's Cut:
DepthBufferClearingNumber=7

new settings:
DepthBufferClearingNumber = 6
DepthBufferClearingFlagNumber = 6

DmC: Devil May Cry:
[DEPTH_BUFFER_DETECTION]
DepthBufferRetrievalMode=1
DepthBufferClearingNumber=0
DepthBufferClearingFlagNumber=6
DepthBufferTextureFormat=0
RestrictDepthBufferDimensions=1

Flashback:
DepthBufferClearingNumber = None
DepthBufferClearingFlagNumber = 6

King's Bounty: Warriors of the North:
DepthBufferClearingNumber=3

new settings:
DepthBufferClearingNumber = 4
DepthBufferClearingFlagNumber = 6

Left 4 Dead 2 (Single Player mode):
DepthBufferClearingNumber = None
DepthBufferClearingFlagNumber = 2

new settings:
[DEPTH_BUFFER_DETECTION]
DepthBufferRetrievalMode=1
DepthBufferClearingNumber=0
DepthBufferClearingFlagNumber=2
DepthBufferTextureFormat=0
RestrictDepthBufferDimensions=1

Mass Effect:
?

Medal of Honor (2010):
DepthBufferClearingNumber = None
DepthBufferClearingFlagNumber = 6

Painkiller: Hell & Damnation:
DepthBufferClearingNumber = None
DepthBufferClearingFlagNumber = 6

Resident Evil 4:
[DEPTH_BUFFER_DETECTION]
DepthBufferRetrievalMode=1
DepthBufferTextureFormat=0
DepthBufferClearingNumber=0
DepthBufferTextureType=0

new settings:
[DEPTH_BUFFER_DETECTION]
DepthBufferRetrievalMode=1
DepthBufferClearingNumber=3
DepthBufferTextureFormat=0
DepthBufferClearingFlagNumber=6
RestrictDepthBufferDimensions=1

Singularity:
?

Spec Ops: The Line:
DepthBufferClearingNumber = None
DepthBufferClearingFlagNumber = 6

Styx: Master of Shadows:
DepthBufferClearingNumber = 0
DepthBufferClearingFlagNumber = 5

Titan Fall 2:
enable adaptive supersampling
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

[DEPTH_BUFFER_DETECTION]
DepthBufferRetrievalMode=2
DepthBufferClearingNumber=0
DepthBufferTextureFormat=2

Trine 2 - Complete Story:
The correct depth map can be retrieved even in the "Post-processing" mode when setting "RestrictDepthBufferDimensions = 0"

Vanquish:
[DEPTH_BUFFER_DETECTION]
DepthBufferRetrievalMode=1
DepthBufferClearingNumber=3
DepthBufferTextureFormat=0
DepthBufferClearingFlagNumber=6
RestrictDepthBufferDimensions=0

X3: Terran War Pack:
DepthBufferClearingNumber=3

XCOM: Enemy Unknown - Complete Edition:
?

X-Men Origins: Wolverine:
?


new:
DmC: Devil May Cry:
[DEPTH_BUFFER_DETECTION]
DepthBufferRetrievalMode=1
DepthBufferClearingNumber=0
DepthBufferClearingFlagNumber=6
DepthBufferTextureFormat=0
RestrictDepthBufferDimensions=1
Last edit: 6 years 6 days ago by DeMondo.
The topic has been locked.
  • brazzjazz
More
6 years 6 days ago #344 by brazzjazz Replied by brazzjazz on topic Depth buffer detection modifications
In Unreal Tournament (1999) and Unreal Tournament 3, there is a depth buffer and depth of field works fine, but MXAO is only applied to the weapon / weapon hand very close to the screen. Does anybody happen to know how to fix this particular issue? Changing the horizon does not do anything at all, beyond the player there is no MXAO at all.
The topic has been locked.
  • lowenz
More
6 years 5 days ago - 6 years 5 days ago #345 by lowenz Replied by lowenz on topic Depth buffer detection modifications
UT 99 doesn't use a d3d9 renderer by default, so let it apart for now.
Unreal Tournament 3 works fine with modded ReShade (no AO on weapon) with these values:

[DEPTH_BUFFER_DETECTION]
DepthBufferRetrievalMode=1
DepthBufferClearingNumber=0
DepthBufferTextureFormat=3
DepthBufferClearingFlagNumber=6
RestrictDepthBufferDimensions=1
Last edit: 6 years 5 days ago by lowenz.
The following user(s) said Thank You: Lost Alpha
The topic has been locked.
  • Chavolatra
More
6 years 4 days ago #346 by Chavolatra Replied by Chavolatra on topic Depth buffer detection modifications
Can have detect depth buffer in emulators ?
The topic has been locked.
  • thalixte
  • Topic Author
More
6 years 4 days ago #347 by thalixte Replied by thalixte on topic Depth buffer detection modifications

Chavolatra wrote: Can have detect depth buffer in emulators ?


You can try, but not sure if it will work, especially if the emulator uses openGL, as the depth buffer detection modifications do not impact this part of Reshade.
The topic has been locked.
  • Nerrel
More
6 years 3 days ago #348 by Nerrel Replied by Nerrel on topic Depth buffer detection modifications

thalixte wrote: You can try, but not sure if it will work, especially if the emulator uses openGL, as the depth buffer detection modifications do not impact this part of Reshade.


Is it possible to have any kind of equivalent workarounds for detecting the depth buffer in OpenGL games? Even if it has to be done in an entirely different manner?
The topic has been locked.
  • robgrab
More
6 years 3 days ago - 6 years 3 days ago #349 by robgrab Replied by robgrab on topic Depth buffer detection modifications
I just added a POST over in the Reshade 3.2 thread about an issue I'm having with this latest version of Reshade that wasn't there in thalixte's experimental version of the dxgi.dll
Last edit: 6 years 3 days ago by robgrab.
The topic has been locked.
  • GP-Unity
More
6 years 1 day ago - 6 years 1 day ago #350 by GP-Unity Replied by GP-Unity on topic Depth buffer detection modifications

DeMondo wrote: Settings overview list - Depth Buffer Detection Modification [ wip / updated April 14, 2018 ]:

Batman: Arkham Asylum:
DepthBufferClearingNumber = None
DepthBufferClearingFlagNumber = 6


I'm not up to date on this forum. How do i apply these values and getting Asylum working with depth buffer? I'm using the latest version of Reshade and added those lines mentioned to the d3d9.ini file under [BUFFER_DETECTION] - didn't manage to get depth buffer access :(
Last edit: 6 years 1 day ago by GP-Unity.
The topic has been locked.
  • conan2k
More
6 years 1 day ago - 6 years 1 day ago #351 by conan2k Replied by conan2k on topic Depth buffer detection modifications

GP-Unity wrote:

DeMondo wrote: Settings overview list - Depth Buffer Detection Modification [ wip / updated April 14, 2018 ]:

Batman: Arkham Asylum:
DepthBufferClearingNumber = None
DepthBufferClearingFlagNumber = 6


I'm not up to date on this forum. How do i apply these values and getting Asylum working with depth buffer? I'm using the latest version of Reshade and added those lines mentioned to the d3d9.ini file under [BUFFER_DETECTION] - didn't manage to get depth buffer access :(


You have to use the test/debug build 85 with thalixte's changes for DX9 (these changes are not available in the stable release of ReShade yet):

d3d9_32bits.zip

BTW, you can also change depth buffer-related settings in the Settings tab of ReShade UI.
Last edit: 6 years 1 day ago by conan2k.
The following user(s) said Thank You: GP-Unity
The topic has been locked.
  • GP-Unity
More
6 years 1 day ago #352 by GP-Unity Replied by GP-Unity on topic Depth buffer detection modifications
Thank you! :cheer: :cheer: :cheer:
I've wanted to replace the crappy default AO in Asylum for far too long. Huge thanks to thalixte as well for making almost every game not completely Reshade compatible before, now compatible!
The topic has been locked.
  • jminternelia
More
5 years 11 months ago #353 by jminternelia Replied by jminternelia on topic Depth buffer detection modifications
Tried on The Long Dark. Depth Buffer has some pretty intense flickering going on. I disabled shadows, didn't work.

The topic has been locked.
  • jminternelia
More
5 years 11 months ago - 5 years 11 months ago #354 by jminternelia Replied by jminternelia on topic Depth buffer detection modifications

conan2k wrote:

thalixte wrote:

conan2k wrote: Is the new "DepthBufferClearingFlagNumber" setting expected to affect the original "Post-processing" retrieval method? It seems to cause visual glitches where they were absent before. I'll do more detailed testing in the evening today.


No, the DepthBufferClearingFlagNumber setting only affects the "Before clearing stage" retrieval mode. If you select "Post process", it does not use this setting.


More extensive testing has shown that it's actually the "Restrict depth buffer dimensions to viewport" checkbox that was causing weird visual issues in games for me. For example, when I've accidentally disabled it in Far Cry 2 (with the original "Post-processing" retrieval method selected), I've got partially transparent walls and various "glowing" artifacts. When I've noticed it and re-enabled the checkbox, everything returned back to "normal". This is definitely not a problem but rather an interesting thing to note.

Regarding the "DepthBufferClearingFlagNumber" setting, it indeed helps to avoid artifacts or even retrieve a correct depth map in some cases where it was not possible before:
1) Left 4 Dead 2 (Single Player mode)
The depth map can now be successfully retrieved after selecting "DepthBufferClearingNumber = None" and "DepthBufferClearingFlagNumber = 2". It had not been possible to retrieve a correct depth map in this game before the "DepthBufferClearingFlagNumber" setting has been introduced.

2) Divinity II: Developer's Cut
The "DepthBufferClearingFlagNumber" setting has helped to "trace and get rid of" remaining visual artifacts. The retrieved depth map is perfectly correct and there are no visual glitches after selecting DepthBufferClearingNumber = 6" and "DepthBufferClearingFlagNumber = 6". Now there is no need to disable the HDR Rendering option in order to get the correct depth map in this game.

3) King's Bounty: Warriors of the North - Complete Edition
Similar to Divinity II, the "DepthBufferClearingFlagNumber" setting has helped to "trace and get rid of" remaining visual artifacts. Now the retrieved depth map is perfectly correct and there are no visual glitches after selecting DepthBufferClearingNumber = 4" and "DepthBufferClearingFlagNumber = 6".

At the same time, there are games that have completely "lost" the depth buffer access after the introduction of "DepthBufferClearingFlagNumber" setting (like The Witcher: Enhanced Edition which has a "partial / broken" depth buffer access when using the previous version of DLL). I'll report those games along with newly tested DX9 games in a separate post.


[strike]I can not get Far Cry 2 to work at all.[/strike] It flashes.
Mind sharing your settings?
Last edit: 5 years 11 months ago by jminternelia.
The topic has been locked.
  • conan2k
More
5 years 11 months ago - 5 years 11 months ago #355 by conan2k Replied by conan2k on topic Depth buffer detection modifications

jminternelia wrote: [strike]I can not get Far Cry 2 to work at all.[/strike] It flashes.
Mind sharing your settings?


Far Cry 2 has never worked as intended for me either. In early builds of D3D9.DLL with thalixte's changes (build 82 and earlier), I was able to get a "non-flashing" depth map but it was disappearing randomly. In recent builds, the depth buffer retrieval is broken for Far Cry 2.

Actually, I was hoping to try Far Cry 2 with DX10 renderer (which is present in the game) after thalixte ports DX11 DBR-related changes to DX10 (he has said that DX10 is pretty similar to DX11 in contrast to DX9 which is very different relative to his DBR changes).
Last edit: 5 years 11 months ago by conan2k.
The following user(s) said Thank You: jminternelia
The topic has been locked.
  • WangWei
More
5 years 11 months ago #356 by WangWei Replied by WangWei on topic Depth buffer detection modifications
Is it fixed for Arma 3?
The topic has been locked.
  • MokouPrice
More
5 years 11 months ago #357 by MokouPrice Replied by MokouPrice on topic Depth buffer detection modifications
I try it with alien rage and MOH2010, depth buffer only shows on hand
The topic has been locked.
  • conan2k
More
5 years 11 months ago #358 by conan2k Replied by conan2k on topic Depth buffer detection modifications

MokouPrice wrote: I try it with alien rage and MOH2010, depth buffer only shows on hand


It doesn't work with the stable build of ReShade yet. You have to use the test/debug build with thalixte's changes for now (and remember to select appropriate "Before clearing" settings in the ReShade UI). Please read posts above for details.
The topic has been locked.
  • Scorpio82CO
More
5 years 11 months ago - 5 years 11 months ago #359 by Scorpio82CO Replied by Scorpio82CO on topic Depth buffer detection modifications
Assasin Creed:

dll ver .85 in DX9
[DEPTH_BUFFER_DETECTION]
DepthBufferClearingNumber=0
DepthBufferClearingFlagNumber= 4 (in cities) - 5 (outsides)
RestrictDepthBufferDimensions=1

Examples:

[img


[img
Last edit: 5 years 11 months ago by Scorpio82CO.
The following user(s) said Thank You: AssassinsDecree
The topic has been locked.
  • Niko of Death
More
5 years 11 months ago #360 by Niko of Death Replied by Niko of Death on topic Depth buffer detection modifications
So, I've been trying out the test build 85 dll, to see if using the values from zBufCompatibilityFlag and zBufClearIndex from gedosato depth presets worked for it (applying to DepthBufferClearingFlagNumber and DepthBufferClearingNumber, respectively). However, in the games I have tried, I simply get garbage like this when using DisplayDepth.

I should note that I have been able to use GeDoSaTo's depth effects to gain access to the depth buffer (this has been discussed on the forums before I believe) for reshade, though one of the games I tried this new dll with did not work through that method (Mass Effect 1, even though other UE3 games, like Mass Effect 2 and Alpha Protocol did work).

Sorry if this has already been discussed, I searched through the thread and could not find anything on this connection.
The topic has been locked.
We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.