Depth buffer detection modifications
- xScruffyDaSasquatchx
-
lowenz wrote: With the menu overlay it's alright (MXAO is correctly applied to ALL surfaces, scene geometry ones and the weapon one with the right depth order):
![]()
Removing the "autopreservation" you got this switching behaviour: www.mediafire.com/file/cmwp4a64ok61g2m/1.mkv/file
Was this ever fixed? I get this as well for Halo 2
- 0nimare
-
In vanilla hl2 or "update" version it works fine after you disable ui (r_drawvgui 0), but in MMOD there is another depth buffer that overrides default one most of time, it lacks viewmodels and physic objects (like props or doors), also sometimes it switches to default depth buffer causing a flicker, or even switches to skybox-only depth buffer.
Any ideas how can it be solved?
- Joruus
-
thalixte wrote: Can you test this one for AC2 ?
d3d9_AC2.zip
With the Reshade.ini settings above:
[DX9_BUFFER_DETECTION]
DisableINTZ=0
PreserveDepthBuffer=1
PreserveDepthBufferIndex=4294967295
AutoPreserve=0
BruteForceFix=0
You can also try with BruteForceFix=1
I cannot get it to work. Regardless of whether I use PreserveDepthBufferIndex=4294967295, PreserveDepthBufferIndex=1 or BruteForceFix=1, I get no depth information using this dll. Regular ReShade dll works fine (but has the character depth bug mentioned earlier).
I am using the Steam version of AC2. Could this be an issue?
- Sweren
-
I don't know nothing about coding so I can't use your repository, excuse me

- Koubarov
-
Regarding TES V: Skyrim, do you know if there is a way to fix depth buffer missing elements (they go on and off) while you rotate the camera or sometimes the fact that the view port doesn't match the depth buffer which results in some out of place black elements (I am using MXAO) showing on the screen as AO shadows objects that are on the depth buffer but these objects do not match what’s visible on screen.
Keep up the great work

- thalixte
-
Topic Author
Sweren wrote: Hi, I'm looking for a way to make depth buffer work on Euro Truck Simulator 2 (DX11)
I don't know nothing about coding so I can't use your repository, excuse me
Will try as soon as i can...
- thalixte
-
Topic Author
Joruus wrote: I cannot get it to work. Regardless of whether I use PreserveDepthBufferIndex=4294967295, PreserveDepthBufferIndex=1 or BruteForceFix=1, I get no depth information using this dll. Regular ReShade dll works fine (but has the character depth bug mentioned earlier).
I am using the Steam version of AC2. Could this be an issue?
Could you test this one ?
d3d9_32bits.zip
With those values:
[DX9_BUFFER_DETECTION]
DisableINTZ=0
PreserveDepthBuffer=1
PreserveDepthBufferIndex=4294967295
AutoPreserve=0
BruteForceFix=0
FocusOnBestOriginalDepthstencilSource=0
- thalixte
-
Topic Author
Koubarov wrote: Thalixte great work on depth buffer detection.
Regarding TES V: Skyrim, do you know if there is a way to fix depth buffer missing elements (they go on and off) while you rotate the camera or sometimes the fact that the view port doesn't match the depth buffer which results in some out of place black elements (I am using MXAO) showing on the screen as AO shadows objects that are on the depth buffer but these objects do not match what’s visible on screen.
Keep up the great work
Thks

Could you test this one ?
d3d9_32bits.zip
With those values:
[DX9_BUFFER_DETECTION]
DisableINTZ=0
PreserveDepthBuffer=1
PreserveDepthBufferIndex=0
AutoPreserve=1
BruteForceFix=1
FocusOnBestOriginalDepthstencilSource=1
- 0nimare
-
- thalixte
-
Topic Author
0nimare wrote: Thanks, seems to fix my issue as well! With only one setting enabled: Preserve Depth Buffer from being cleared. And of course MSAA and UI disabled.
Yes, the settings i provided are for TES Oblivion. Did not test on TES V Skyrim. Good to know it works

- 0nimare
-

- thalixte
-
Topic Author
0nimare wrote: I'm the one who had issue with HL2:MMOD though
For me, HL2 works perfectly with the dll i just provided without having to set r_drawvgui to 0 (without disabling the UI). Here are my settings:
[DX9_BUFFER_DETECTION]
DisableINTZ=0
PreserveDepthBuffer=1
PreserveDepthBufferIndex=1
AutoPreserve=1
BruteForceFix=0
FocusOnBestOriginalDepthstencilSource=0
- 0nimare
-
- thalixte
-
Topic Author
0nimare wrote: Yep, vanilla hl2 works pefectly but I'm playing hl2update + mmod, both of them have done some changes to engine so it's not surprising that z buffer behaves differently. Anyway, thanks again, now everything works just fine even if ui needs to be disabled.
In vanilla hl2, i do not need to disable the ui for the depth buffer to work. When you say you disable the UI, you talk about the mod ?
- 0nimare
-
Upd:
With these settings HL2:Update:MMod seems to work fine even with ui enabled
[DX9_BUFFER_DETECTION]
DisableINTZ=0
PreserveDepthBuffer=1
PreserveDepthBufferIndex=1
AutoPreserve=0
BruteForceFix=0
FocusOnBestOriginalDepthstencilSource=0
Upd2:
Doesn't work on some maps, or in some places. Sometimes the correct buffer is with index 2 or 3. Auto preserve often fails to guess the correct one. However with UI disabled and only "preserve depth buffer from being cleared" selected it works great.
- thalixte
-
Topic Author
0nimare wrote: Upd2:
Doesn't work on some maps, or in some places. Sometimes the correct buffer is with index 2 or 3. Auto preserve often fails to guess the correct one. However with UI disabled and only "preserve depth buffer from being cleared" selected it works great.
Is it with the mod ?
Could you please send a video of the pb, displaying the dx9 tab ? Thks.
- Koubarov
-
thalixte wrote:
Koubarov wrote: Thalixte great work on depth buffer detection.
Regarding TES V: Skyrim, do you know if there is a way to fix depth buffer missing elements (they go on and off) while you rotate the camera or sometimes the fact that the view port doesn't match the depth buffer which results in some out of place black elements (I am using MXAO) showing on the screen as AO shadows objects that are on the depth buffer but these objects do not match what’s visible on screen.
Keep up the great work
Thks
Could you test this one ?
d3d9_32bits.zip
With those values:[DX9_BUFFER_DETECTION] DisableINTZ=0 PreserveDepthBuffer=1 PreserveDepthBufferIndex=0 AutoPreserve=1 BruteForceFix=1 FocusOnBestOriginalDepthstencilSource=1
Thanks for the rapid response thalixte. Will check the new DLL and settings as soon as I get home and post the results later today.
- 0nimare
-
thalixte wrote: Is it with the mod ?
Could you please send a video of the pb, displaying the dx9 tab ? Thks.
It actually happens in just hl2upd and vanilla hl2
HL2:Update with auto preserve (223 mb)
HL2:Update with index 1 preserved (509 mb)
Vanilla HL2 with auto preserve (246 mb)
Vanilla HL2 with index 1 preserved (231 mb)
- Joruus
-
thalixte wrote: Could you test this one ?
d3d9_32bits.zip
With those values:[DX9_BUFFER_DETECTION] DisableINTZ=0 PreserveDepthBuffer=1 PreserveDepthBufferIndex=4294967295 AutoPreserve=0 BruteForceFix=0 FocusOnBestOriginalDepthstencilSource=0
Thank You very much! This dll works great in the Steam version of AC2, albeit with the following settings:
[DX9_BUFFER_DETECTION]
DisableINTZ=0
PreserveDepthBuffer=1
PreserveDepthBufferIndex=4294967295
AutoPreserve=1
BruteForceFix=0
FocusOnBestOriginalDepthstencilSource=0
[DX9_BUFFER_DETECTION]
DisableINTZ=0
PreserveDepthBuffer=1
PreserveDepthBufferIndex=0
AutoPreserve=0
BruteForceFix=0
FocusOnBestOriginalDepthstencilSource=0
Thank you again for your awesome work!

- Koubarov
-
I had to disable the weapon and stencil fixes in order to get an almost perfect Depth Buffer.
Objects no longer disappear from the Depth Buffer while panning the camera although at times some flickering (Depth Buffer turns off for a split second) and minor artifacts at the bottom of the screen are occurring. Most of the time it works so definitely an improvement.
Lastly there is a weird bug happening that I don't know if it's the modified .dll that does it or Marty's Quint MXAO.
If I enable MXAO_Quint from the start, the main menu screen and loading screen are blackened severely and the other Depth Buffer effects (namely Adaptive Fog) can't access the Depth Buffer in game, if then I force a reload of ReShade everything works as intended and when exiting to the main menu there is no blackening of the 2D image.
To remedy this I have ΜΧΑΟ_Quint disabled in my profile and I re-enabled (through a key stroke) it on the first in-game load of my save game and everything works fine after that.