Depth buffer detection modifications

  • cloud6625
More
6 years 8 months ago #361 by cloud6625 Replied by cloud6625 on topic Depth buffer detection modifications
Been testing this out on some games and Guilty Gear Xrd Rev 2 is giving me a very unusual issue.

With DepthBufferClearingNumber set to 2-4 the game generates an incomplete depth buffer that misses a few objects.

While setting DepthBufferClearingNumber to 5-8 fixes the depth buffer, making it recognize the previously broken objects. Note the added tree leaves and plants in the background.

The issue however, is that setting the higher clearing number also causes the visuals outside of the depthbuffer to overlap incorrectly. Note the cloud layer and odd ghosting present in front of the character models.

with clearing number at 8 the ghosting effect is reduced, but not fully fixed, and the cloud layer is still incorrect. Setting it to 9 breaks the depth buffer completely.

I've been fiddling with different settings for quite some time, but haven't been able to solve the issue. The only thing I've managed to do is setting DepthBufferTextureFormat to anything higher than 0 makes clearing number 8 no longer display the depth buffer.
The topic has been locked.
  • Koubarov
More
6 years 8 months ago #362 by Koubarov Replied by Koubarov on topic Depth buffer detection modifications
Anyone managed to get Depth Buffer access for the first Borderlands? Using the latest official Reshade build I can only see the gun when checking display depth. Things don't get better when using thalixte's custom build as trying various settings results in a broken image like user's Niko of Death screens.
The topic has been locked.
  • rickyback
More
6 years 8 months ago - 6 years 8 months ago #363 by rickyback Replied by rickyback on topic Depth buffer detection modifications
Hi,

Here's a video of an issue I'm experiencing in Fallout 3.

When you move the camera around, some water reflections start disappearing and appearing again depending on the angle.

I'm using ReShade v3.2.2 with DisplayCAL LUT. No other effects. The water reflections work perfectly fine after l uninstall ReShade.

Here's the config file:
[GENERAL]
EffectSearchPaths=C:\GOG Games\Fallout 3\ReShade
TextureSearchPaths=C:\GOG Games\Fallout 3\ReShade
ScreenshotPath=C:\GOG Games\Fallout 3\Screenshots
PerformanceMode=1
ShowClock=1
ShowFPS=0
NoReloadOnInit=0
TutorialProgress=4
PreprocessorDefinitions=RESHADE_DEPTH_LINEARIZATION_FAR_PLANE=1000.0,RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN=0,RESHADE_DEPTH_INPUT_IS_REVERSED=1,RESHADE_DEPTH_INPUT_IS_LOGARITHMIC=0
PresetFiles=
CurrentPreset=-1
ScreenshotFormat=0
FontGlobalScale=1.000000

[INPUT]
KeyMenu=113,0,1
KeyScreenshot=44,0,0
InputProcessing=2
KeyEffects=0,0,0

[BUFFER_DETECTION]
DepthBufferRetrievalMode=0
DepthBufferTextureFormat=0

[STYLE]
Alpha=0.500000
ColActive=0.200000,0.200000,1.000000
ColFPSText=0.921569,0.960784,1.000000
ColBackground=0.275000,0.275000,0.275000
ColItemBackground=0.447000,0.447000,0.447000
ColText=0.800000,0.900000,0.900000
I'm using in-game AA and not forcing it through the NVCP.

Is there any chance using the custom DLLs might help with these glitches? Or maybe there's simply something I can change in the INI?
Last edit: 6 years 8 months ago by rickyback.
The topic has been locked.
  • MonarchX
More
6 years 8 months ago #364 by MonarchX Replied by MonarchX on topic Depth buffer detection modifications
Witcher 3 MXAO with in-game AA enabled? Possible? YES? Do tell!
The topic has been locked.
  • MoonMan123
More
6 years 8 months ago #365 by MoonMan123 Replied by MoonMan123 on topic Depth buffer detection modifications

MonarchX wrote: Witcher 3 MXAO with in-game AA enabled? Possible? YES? Do tell!


Possible but it causes the depth buffer to "shake" and it does not look good in anyway. W3's AA is trash anyways so just use reshades SMAA instead.
The topic has been locked.
  • Martigen
More
6 years 8 months ago #366 by Martigen Replied by Martigen on topic Depth buffer detection modifications
Firstly, thank you so much Thnxlite for massively improving depth buffer detection in Reshade!!


Secondly, which of these settings are part of the current official release (3.3) and how do we set them?
[DEPTH_BUFFER_DETECTION]
DepthBufferRetrievalMode=1
DepthBufferClearingNumber=0
DepthBufferTextureFormat=3
DepthBufferClearingFlagNumber=6
RestrictDepthBufferDimensions=1


Thirdly -- @DeMondo

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

Aarklash: Legacy:
DepthBufferClearingNumber = None
DepthBufferClearingFlagNumber = 2
...[cut]

Thank you so much for putting this all together. Can I request you create a separate thread for this and maybe we can get Crosire to pin it, this way we have an easy to find database of the best settings to use for each game as we add to it.


And lastly, if you're not already aware Thnxlite's depth buffer changes can be used with SMAA's Prediction feature that Marty recently fixed to get even better anti-aliasing with SMAA. To take advantage of this simply:

1) Add the following to Reshade's pre-processor defines under the Settings tab:
SMAA_PREDICATION=1

2) Ensure SMAA is set to 'Color edge detection' (which is the default).

The original changes to SMAA to add predication were by Ceejay and it's tied to the Color Edge Detection method to combine Color with Depth. You can also choose just Depth, but as you'll see if you enable the debug views you'll get a lot less than the combination of both. Luminance detection, as far as I am aware, does not take advantage of Predication.

Be sure to make the depth buffer is showing up in game properly before enabling predication, as you would with MXAO or DOF etc :)
The following user(s) said Thank You: thalixte
The topic has been locked.
  • thalixte
  • Topic Author
More
6 years 7 months ago #367 by thalixte Replied by thalixte on topic Depth buffer detection modifications
You're welcome B) I am really busy right now, so i haven't spend much time to advance on it for dx9. I hope i will have some more time in august to solve the last remaining problems for DX9.

Alongside, i completely rewrote the depth buffer detection for dx11, when it is retrieved before the depth buffer clearing stage. It should be more efficient and use less resource, as it does not create a new texture anytime it copies the depth buffer.

Hope i will find some times to propose a new pull request to Crosire.
The topic has been locked.
  • domjam
More
6 years 7 months ago - 6 years 7 months ago #368 by domjam Replied by domjam on topic Depth buffer detection modifications
can someone explain to me how I can get settings like MAXO and DOF to work in games like Half life 2 and Might and magic Dark masiah? when I try to mess around with the DOF settings it just effects the whole screen. and MAXO takes no effect at all. I have tried setting 0 and 1 in the revers and upside down depth under settings but nothing seems to work. what am I doing wrong?
Last edit: 6 years 7 months ago by domjam.
The topic has been locked.
  • FYKC
More
6 years 7 months ago #369 by FYKC Replied by FYKC on topic Depth buffer detection modifications

domjam wrote: can someone explain to me how I can get settings like MAXO and DOF to work in games like Half life 2 and Might and magic Dark masiah? when I try to mess around with the DOF settings it just effects the whole screen. and MAXO takes no effect at all. I have tried setting 0 and 1 in the revers and upside down depth under settings but nothing seems to work. what am I doing wrong?


DirectX9 support isn't complete yet.
The topic has been locked.
  • JoeJoe90
More
6 years 7 months ago #370 by JoeJoe90 Replied by JoeJoe90 on topic Depth buffer detection modifications

domjam wrote: can someone explain to me how I can get settings like MAXO and DOF to work in games like Half life 2 and Might and magic Dark masiah? when I try to mess around with the DOF settings it just effects the whole screen. and MAXO takes no effect at all. I have tried setting 0 and 1 in the revers and upside down depth under settings but nothing seems to work. what am I doing wrong?


Source Engine based games have problem with this for some reason. You can try to hide the the GUI using r_drawvgui (in some of those games, it counts as cheat, so you'll need to enable sv_cheats, then set r_drawvgui to 0. You won't see HUD, menus and other GUI related stuffs... I would bind enabling and disabling it with a key. If you set r_drawvgui 0 then depth-buffer based effects like MXAO, DOF will work...
The topic has been locked.
  • thalixte
  • Topic Author
More
6 years 7 months ago - 6 years 7 months ago #371 by thalixte Replied by thalixte on topic Depth buffer detection modifications
Hello everybody ! It's been a long time since i did not publish on this thread. Sorry, because i am very busy nowadays. I plan to rework on the d3d9 version of the depth buffer detection techniques in august i think (perhaps before, but it is not sure)...

For the moment, i rewrote the d3d11 depth buffer detection, and i ported those modifications to d3d10.

I tested the 32bits version on Far Cry 2, and it works very well :P
Because it uses the last Reshade version, the depth bufffer selection settings are available on a DX10 tab.
You can then select here the depth buffer you want to display (not every depth buffer work, you have to find the good one, but it is quite easy, you will see)...

Far Cry 2:
[img
Last edit: 6 years 7 months ago by thalixte.
The following user(s) said Thank You: Uncle Crassius
The topic has been locked.
  • Uncle Crassius
More
6 years 7 months ago - 6 years 7 months ago #372 by Uncle Crassius Replied by Uncle Crassius on topic Depth buffer detection modifications
DX11 tab* ;). Very cool, though. Gave it a quick try with Cities Skylines an lo and behold, it's working – almost. Funny issue: The depth buffer looks like it's below the actual surface. It's not just displaced. Kinda weird effect (yes, it's upside down and inverted). Still very promising. Can't wait to do more tests with other games. Next up: Bad Company 2.
Last edit: 6 years 7 months ago by Uncle Crassius.
The topic has been locked.
  • thalixte
  • Topic Author
More
6 years 7 months ago #373 by thalixte Replied by thalixte on topic Depth buffer detection modifications

Uncle Crassius wrote: DX11 tab* ;). Very cool, though. Gave it a quick try with Cities Skylines an lo and behold, it's working – almost. Funny issue: The depth buffer looks like it's below the actual surface. It's not just displaced. Kinda weird effect (yes, it's upside down and inverted). Still very promising. Can't wait to do more tests with other games. Next up: Bad Company 2.


DX11 tab is not my idea. It's Crosire's one ;)
The topic has been locked.
  • Uncle Crassius
More
6 years 7 months ago #374 by Uncle Crassius Replied by Uncle Crassius on topic Depth buffer detection modifications
It's working in Cities: Skylines with free camera mode (small icon in the lower right). Not playable, but good for screenshots. BFBC2 works as well, weapon is invisible in depth buffer, though, leading to a transparent look due to MXAO shining through. Cool nonetheless.
The topic has been locked.
  • lowenz
More
6 years 7 months ago #375 by lowenz Replied by lowenz on topic Depth buffer detection modifications
DX Human Revolution DC working beautifully! :D (extended mode + 4)

[img


[img
The topic has been locked.
  • lowenz
More
6 years 7 months ago #376 by lowenz Replied by lowenz on topic Depth buffer detection modifications
^_^ (MXAO in action)

[img


[img
The topic has been locked.
  • thalixte
  • Topic Author
More
6 years 7 months ago - 6 years 7 months ago #377 by thalixte Replied by thalixte on topic Depth buffer detection modifications
Yes, and it also works in the cutscenes :) If it is like DXHRML, you do not need the extended mode for it to work...
Last edit: 6 years 7 months ago by thalixte.
The topic has been locked.
  • andrewbaay
More
6 years 7 months ago #378 by andrewbaay Replied by andrewbaay on topic Depth buffer detection modifications
mega links are down. can i have a beta .dll? i want to test this with hl2. much appreciated <3
i was wondering for MONTHS how to get DB from old d3d9 games that erases them before final image.
Thx in advance
The topic has been locked.
  • Chavolatra
More
6 years 7 months ago #379 by Chavolatra Replied by Chavolatra on topic Depth buffer detection modifications
depth buffer work fine now in resident evil revelations 2 or dont
The topic has been locked.
  • andrewbaay
More
6 years 7 months ago - 6 years 7 months ago #380 by andrewbaay Replied by andrewbaay on topic Depth buffer detection modifications
These are the images of the DB thats on HL2 during testing:
sometimes the DB gets drawn completely on a different stage of the process i had to change the clearing number and the flag number manually to find the correct DB.
Same settings but different camera angle.
Warning: Spoiler!

Warning: Spoiler!


Sometimes the DB is on another number and the water depth is displayed (when looking at water or when water is present) i had to change it manually.
Last edit: 6 years 7 months ago by andrewbaay. Reason: More information
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.