Depth buffer detection modifications
- lowenz
Yes! (Jensen apartment)thalixte wrote:
lowenz wrote:
Maybe it was First/Second, and I remember wrong (probably).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...
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 ?
- jminternelia
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!
- DeMondo
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
- brazzjazz
- lowenz
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
- Chavolatra
- thalixte
- Topic Author
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.
- Nerrel
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?
- robgrab
- GP-Unity
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
- conan2k
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.
- GP-Unity
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!
- jminternelia
- jminternelia
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?
- conan2k
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).
- WangWei
- MokouPrice
- conan2k
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.
- Scorpio82CO
dll ver .85 in DX9
[DEPTH_BUFFER_DETECTION]
DepthBufferClearingNumber=0
DepthBufferClearingFlagNumber= 4 (in cities) - 5 (outsides)
RestrictDepthBufferDimensions=1
Examples:
- Niko of Death
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.