Depth buffer detection modifications
- thalixte
- Topic Author
Koubarov wrote: Update regarding Skyrim.
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.
Thks for your feedback. Have you tried to enable the "Focus on the best original depthstencil source" checkbox to see if it removes the blacken in the main menus ?
For the weapon, have you try to tick the "Fix for user weapon or cockpit" checkbox ?
- thalixte
- Topic Author
0nimare wrote:
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)
Can you test this one ?
d3d9_hl2.zip
- 0nimare
Settings:
[DX9_BUFFER_DETECTION]
DisableINTZ=0
PreserveDepthBuffer=1
PreserveDepthBufferIndex=4294967295
AutoPreserve=0
BruteForceFix=0
FocusOnBestOriginalDepthstencilSource=0
Works almost perfectly in hl2:update:mmod, occasionally when rotating camera depth buffer becomes empty for like a frame causing a flicker.
Also if I change any setting when map is loaded will cause rendering issue, like making whole map invisible, flickering map parts, background part displaying in front , BUT if I just launch the game with settings above and don't change anything it doesn't happen. FocusOnBestOriginalDepthstencilSource=1 fixes the rendering issue but makes weapon and doors invisible on depth buffer. Alt-tabbing also seems to cause or fix the rendering issue.
Thanks again!
Update: i.imgur.com/bCdlth5.jpg - another issue, happens with PreserveDepthBuffer=1 in update, update:mmod, but not in vanilla hl2
- Koubarov
thalixte wrote:
Thks for your feedback. Have you tried to enable the "Focus on the best original depthstencil source" checkbox to see if it removes the blacken in the main menus ?
For the weapon, have you try to tick the "Fix for user weapon or cockpit" checkbox ?
Updated feedback on Skyrim. None of the above options fixes the blackened problem in the main menu in Skyrim on first load.
The "Focus on the best original depthstencil source" fixes the occasional artifacts which appear at the bottom of the screen though it increases the depth buffer flickering so from the two evils I prefer less depth buffer flickering and I keep it disabled.
Actually both the fixes increase the frequency of Depth Buffer flickering so I have them both deactivated.
- thalixte
- Topic Author
0nimare wrote: Thanks a lot! Works perfectly for vanilla and update. Tested all maps and places that had issues before.
Settings:[DX9_BUFFER_DETECTION] DisableINTZ=0 PreserveDepthBuffer=1 PreserveDepthBufferIndex=4294967295 AutoPreserve=0 BruteForceFix=0 FocusOnBestOriginalDepthstencilSource=0
Works almost perfectly in hl2:update:mmod, occasionally when rotating camera depth buffer becomes empty for like a frame causing a flicker.
Also if I change any setting when map is loaded will cause rendering issue, like making whole map invisible, flickering map parts, background part displaying in front , BUT if I just launch the game with settings above and don't change anything it doesn't happen. FocusOnBestOriginalDepthstencilSource=1 fixes the rendering issue but makes weapon and doors invisible on depth buffer. Alt-tabbing also seems to cause or fix the rendering issue.
Thanks again!
Update: i.imgur.com/bCdlth5.jpg - another issue, happens with PreserveDepthBuffer=1 in update, update:mmod, but not in vanilla hl2
And with this one ?
d3d9_hl2.zip
- 0nimare
imgur.com/a/bni2aii
- thalixte
- Topic Author
0nimare wrote: I think this one made it worse
imgur.com/a/bni2aii
And with this one, same pb ?
d3d9_hl2.zip
- dedicateddark
Wanted to tryout the path tracing shader on the game. And also MXAO. Help would be much appreciated. I have no idea on how to compile or code or anything, so can't do anything with github links.
- 0nimare
Yep, same issue. I tried playing in windowed (so there is no alt tab) ignoring small rendering glitches but crashed few times. I assume crash happens when game tries to unload bugged model - killing enemies, map changing or just going back to main menu.thalixte wrote: And with this one, same pb ?
d3d9_hl2.zip
- Koubarov
I managed to eliminate the blackening problem which seems related to the new HQ Ground-Truth AO mode in MXAO_Quint.
I reverted back to the normal AO mode and the problem is solved no longer the menu gets darkened on first load.
Plus I managed to solve the problem of AO "stealing" the Depth Buffer by moving Adaptive Fog at the top with ΜΧΑΟ following after.
Now both effects are working as intended on first load and no longer a reload is needed.
So to sum it up, so far it seems that the disparity between the Depth Buffer and Viewport on internal cells is solved (at least to the dungeons I've checked).
Plus on external cells Depth Buffer works as intended but with flickering and minor artifacts at the bottom of the screen at times.
- thalixte
- Topic Author
dedicateddark wrote: Reshade 4.2.1 seems to not be able to access the depth buffer on Arkham Asylum, so far I have tried turning off the MSAA, lowering all the settings & cut-off internet connection. As well as cycling through every available setting on the depth buffer.
Wanted to tryout the path tracing shader on the game. And also MXAO. Help would be much appreciated. I have no idea on how to compile or code or anything, so can't do anything with github links.
Here is the last dll:
d3d9.zip
For me, works good with those settings:
[DX9_BUFFER_DETECTION]
DisableINTZ=0
PreserveDepthBuffer=1
PreserveDepthBufferIndex=0
AutoPreserve=1
FocusOnBestOriginalDepthstencilSource=0
BruteForceFix=0
- thalixte
- Topic Author
Koubarov wrote: Update 2 on Skyrim.
I managed to eliminate the blackening problem which seems related to the new HQ Ground-Truth AO mode in MXAO_Quint.
I reverted back to the normal AO mode and the problem is solved no longer the menu gets darkened on first load.
Plus I managed to solve the problem of AO "stealing" the Depth Buffer by moving Adaptive Fog at the top with ΜΧΑΟ following after.
Now both effects are working as intended on first load and no longer a reload is needed.
So to sum it up, so far it seems that the disparity between the Depth Buffer and Viewport on internal cells is solved (at least to the dungeons I've checked).
Plus on external cells Depth Buffer works as intended but with flickering and minor artifacts at the bottom of the screen at times.
Just to check, can you try this last one (not sure it will resolve your flickerings):
d3d9.zip ?
Also, can you submit a video of the flickering pb ? Thks a lot.
- thalixte
- Topic Author
0nimare wrote:
Yep, same issue. I tried playing in windowed (so there is no alt tab) ignoring small rendering glitches but crashed few times. I assume crash happens when game tries to unload bugged model - killing enemies, map changing or just going back to main menu.thalixte wrote: And with this one, same pb ?
d3d9_hl2.zip
A last try:
d3d9_hl2.zip
- 0nimare
DisableINTZ=0
PreserveDepthBuffer=1
PreserveDepthBufferIndex=4294967295
AutoPreserve=1
BruteForceFix=0
FocusOnBestOriginalDepthstencilSource=0
I think you've made it! The only issue is a flicker when depth buffer switches. Thanks!
Update: there were some rendering issues after alt tabbing in fullscreen - fixed by going borderless windowed
Sometimes crashes when map changes, not sure why it happens, I assume after messing with shader settings or maybe just recompiling them - if I just launch the game with shaders set to performance mode and don't touch them it works fine
- Insomnia
Thank you for releasing this.
Is it available for OpenGL as well? Would love to use this for Doom 3.
- x8009
Any idea what is the issue ?
In the pictures it shows the Distortion when alt tabbing , then the Depth View issue then after clicking Reload depth view and normal . It doesn't cause issue when first launching the game , I do use AfterBurner to take the screenshots and such but I don't think that what causing the issue. it was working fine before it.
Only Reload button fix the issue, no other changes , changing depth buffer, disabling shaders fix the issue.
To fix it I need to open the Reshade menu and Reload , then it fixes the issue, with 4.2.x it didn't happen or many versions before.
- thalixte
- Topic Author
Insomnia wrote: I can't believe I've missed out on this for so long.
Thank you for releasing this.
Is it available for OpenGL as well? Would love to use this for Doom 3.
Unfortunately, it is not for the moment. If i have some times, i will, but maybe the priority is on dx12 implementation, i guess.
- 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
Just tested, but it only works in DX9 for me.
Unfortunately, i will not be able to retrieve a valid depth buffer for this specific game. It uses a special viewport, and, most of all, to retrieve the db correctly, Reshade needs to have access to the transformation matrices of the game, because the db texture is not placed accordingly to the player's view.
- thalixte
- Topic Author
x8009 wrote: Stated happen with 4.3.0 when I alt tab for example in NFS Payback I get this
Any idea what is the issue ?
In the pictures it shows the Distortion when alt tabbing , then the Depth View issue then after clicking Reload depth view and normal . It doesn't cause issue when first launching the game , I do use AfterBurner to take the screenshots and such but I don't think that what causing the issue. it was working fine before it.
Only Reload button fix the issue, no other changes , changing depth buffer, disabling shaders fix the issue.
To fix it I need to open the Reshade menu and Reload , then it fixes the issue, with 4.2.x it didn't happen or many versions before.
Just tested with Reshade 4.3, and i was not able to reproduce the pb. Not sure it is Reshade related.
- Pat_s2