Depth buffer detection modifications
- cloud6625
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.
- Koubarov
- rickyback
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
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?
- MonarchX
- MoonMan123
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.
- Martigen
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
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.DeMondo wrote: Settings overview list - Depth Buffer Detection Modification [ wip / updated April 14, 2018 ]:
Aarklash: Legacy:
DepthBufferClearingNumber = None
DepthBufferClearingFlagNumber = 2
...[cut]
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
- thalixte
- Topic Author
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.
- domjam
- FYKC
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.
- JoeJoe90
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...
- thalixte
- Topic Author
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
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:
- Uncle Crassius
- thalixte
- Topic Author
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
- Uncle Crassius
- lowenz
- lowenz
- thalixte
- Topic Author
- andrewbaay
i was wondering for MONTHS how to get DB from old d3d9 games that erases them before final image.
Thx in advance
- Chavolatra
- andrewbaay
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.
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.