protonscr

Causes flickering depth buffer in TES: Oblivion

dxvkclosed d3d9needs more infowindowsprobably not our bug
doitsujin/dxvk#3918 · opened 2024-03-21 by adamnorbacker · updated 2024-10-21 · 38 comments · github
Aadamnorbacker 2024-03-21 github

Without DXVK the depth buffer is working always, but as soon as DXVK is loaded, the depth buffer flickers while moving the camera.
This can be easily seen with Reshade v6.0.1 and the detect depth shader.

Software information

The elder scrolls IV: Oblivion
Default settings.

System information

  • GPU: RTX 4090
  • Driver: 551.86
  • Wine version:
  • DXVK version: 2.3.1 x86
  • Windows 11
KK0bin maintainer 2024-03-21 github

Please make a video of the issue, I have no idea what you're talking about.

The depth buffer is used for a lot more than just ReShade effects so if DXVK had problems with that, it would be extremely obvious by just playing the game. The game itself renders fine though.

BBlisto91 2024-04-15 github

@adamnorbacker Friendly ping

BBlisto91 2024-05-19 github

@adamnorbacker double friendly ping

Ttiramoi 2024-06-29 github

Oblivion 2024-06-30 00-38-07
@K0bin this is what it looks like

KK0bin maintainer 2024-06-29 github

And which ReShade shader causes that?

Ttiramoi 2024-06-29 github

Reshade 6.1.1. Also using an RX 6600, Driver ver. 24.5.1, Dxvk ver. 2.3.1

Ttiramoi 2024-06-29 github

This causes some issues with shaders like MXAO with visual artifacting, gonna send screenshot in a sec

Ttiramoi 2024-06-29 github

sdlkjalsdjlakdjlkdla

Ttiramoi 2024-06-29 github

I can also confirm what the OP posted. Depth buffer works fine on dx9. Things i've tried: turning off forced msaa and anisotropy from dxvk.conf, experimented with all the generic depth buffer options under reshade addon. No dice.

Ttiramoi 2024-06-29 github

And which ReShade shader causes that?

Oh my bad, I misread that as reshade version. That's just the display depth shader showing that, but the issue can also be observed when using the various debug views from the different shaders. Let me check if turning off all shaders fixes the issue.

Edit: yep, still nothing.

KK0bin maintainer 2024-06-29 github

Did you have to install any shaders with ReShade or is it literally just ReShade?

BBlisto91 2024-06-29 github

I've tried reproducing both on Nvidia and AMD on Linux but have been unable to so far.
In the "Generic Depth" addon I've set "Copy depth buffer before clear operations" to get it to work. Then i just turn on DisplayDepth with RESHADE_DEPTH_INPUT_IS_REVERSED set to 0.

Screenshot

Nvidia
image

AMD
image

Ttiramoi 2024-06-29 github

Did you have to install any shaders with ReShade or is it literally just ReShade?

I have shaders with reshade.
ReShadePreset.zip

Ttiramoi 2024-06-29 github

Also my reshade ini and log i guess
reshade.zip

BBlisto91 2024-06-29 github

You sent ReShadePreset.ini twice. Don't know if that was intended

Ttiramoi 2024-06-29 github

You sent ReShadePreset.ini twice. Don't know if that was intended

my bad.
reshade.zip

BBlisto91 2024-06-29 github

I am still not reproducing, at least on Linux, using your preset and the settings from your ReShade.ini.
I am using the d3d9 version of reshade fwiw

Ttiramoi 2024-06-29 github

I am still not reproducing, at least on Linux, using your preset and the settings from your ReShade.ini. I am using the d3d9 version of reshade fwiw

Am using windows 11 like op if it makes a difference. Also here's a vid of the issue https://www.youtube.com/watch?v=kMfvoKc8w4o

KK0bin maintainer 2024-06-29 github

Make sure you don't have any other Vulkan layers installed.

Ttiramoi 2024-06-29 github

Make sure you don't have any other Vulkan layers installed.

I don't remember consciously installing any. I don't know what a Vulkan layer is either. How do I check?

BBlisto91 2024-06-29 github

Can you send a dxvk log by the way. It should appear next to the games exe

Ttiramoi 2024-06-29 github

Can you send a dxvk log by the way. It should appear next to the games exe

Oblivion_d3d9.zip
is it this?

KK0bin maintainer 2024-06-29 github

Does it work if you remove your samplerAnisotropy config? That can cause problems.

Ttiramoi 2024-06-30 github

Does it work if you remove your samplerAnisotropy config? That can cause problems.

@K0bin nope. Removed dxvk.conf altogether. Disabling anisotropy and msaa doesnt work.

BBlisto91 2024-07-02 github

@tiramoi Which API do you use for Reshade along with dxvk? d3d9 or Vulkan?
Using the Vulkan version on Windows (didn't work out of the box on Linux) i can see that the DisplayDepth option is kinda fecked with dxvk. Though not exactly in the same way as shown in your screenshot. More like it blinks wildly or doesn't show anything when looking certain directions.
The d3d9 version along with dxvk still works fine though. Was also what i used on Linux.

Ttiramoi 2024-07-02 github

@Blisto91 Vulkan. When installing reshade, I chose vulkan when it asked me what api to use.

How do I use d3d9 along with dxvk?

Ttiramoi 2024-07-02 github

@Blisto91 also dx9 on windows 11 have issues for me for oblivion. Can't use the HDR option in oblivion, and if I use a workaround for fixing HDR, it breaks the shadows. I just hope using d3d9 with dxvk wont carry over those issues

BBlisto91 2024-07-03 github

How do I use d3d9 along with dxvk?

If you install the d3d9 version of reshade and then just leave that d3d9.dll with the game you can put the dxvk dll in another folder and then point to that folder with environment variable RESHADE_MODULE_PATH_OVERRIDE. Will make reshade use it instead of the Windows system one.

Aadamnorbacker 2024-07-03 github

How do I use d3d9 along with dxvk?

If you install the d3d9 version of reshade and then just leave that d3d9.dll with the game you can put the dxvk dll in another folder and then point to that folder with environment variable RESHADE_MODULE_PATH_OVERRIDE. Will make reshade use it instead of the Windows system one.

Will that enforce vulkan hdr compatible swapchains by doing that? Or will it essentially make it dx9 and hdr wont work?

BBlisto91 2024-07-03 github

I'm a tester fwiw not a dev. Do you just mean the games own "HDR" option?

Aadamnorbacker 2024-07-03 github

Nah, Vulkan makes dx9 games compatible with HDR such as windows autoHDR or Special-K etc. Im just wondering if doing your proposal would make the actual renderer dx9 again and therefore disabling the possibility to use HDR.

BBlisto91 2024-07-03 github

I have no idea how Reshade works if you mean as a side effect of that. It would still be using dxvk (Vulkan) in this scenario.
Try i guess.

KK0bin maintainer 2024-07-03 github

Either way this very much seems like it's not a DXVK bug but rather a bug with something else on your system. Some Vulkan layer or maybe ReShade or SpecialK.

Eemoose 2024-10-21 github

Seeing this happen on fresh Windows install too (with ReShade VK applied), though only once OR is installed, without OR it seems no depth buffers are valid for ReShade.

With native D3D9 + OR, ReShade shows 2 clears for the depth buffer consistently, and no flicker happens.
With DXVK + OR, ReShade usually shows 5 clears for the depth buffer, but sometimes seems to add an extra clear for 1 frame, which throws off the detection and causes flicker.

OR.E3.3.3.2mc.Mcstfuerson.Preset.zip from https://github.com/mcstfuerson/TES-Reloaded/releases/tag/v3.3.2 is the OR build used to test that.

KK0bin maintainer 2024-10-21 github

With native D3D9 + OR, ReShade shows 2 clears for the depth buffer consistently, and no flicker happens.
With DXVK + OR, ReShade usually shows 5 clears for the depth buffer, but sometimes seems to add an extra clear for 1 frame, which throws off the detection and causes flicker.

That sounds like a ReShade problem, not a DXVK one. DXVK can't control or influence what ReShade does.
I don't even know whether you're using the D3D9 version of ReShade with DXVK or the Vulkan version of ReShade.

Eemoose 2024-10-21 github

It's ReShade VK as mentioned.

Might have narrowed my issue down to games "Window Reflections" setting, with that turned off the depth flicker mostly disappears & ReShade works fine with it.

That reflections setting uses some fSecondsBetweenWindowUpdate timer to say when to update, default is 10 secs but changing to 1 second makes the flicker constant (now I wonder if timer could be removed from game so the clear for it would be present every frame - probably wouldn't be great for performance though...)

Anyway I guess my issue probably is just down to ReShade's detection, still find it a bit strange that D3D9 doesn't show any extra clears for these reflections though.

BBlisto91 2024-10-21 github

Does it look correct with the d3d9 version of reshade + dxvk?

KK0bin maintainer 2024-10-21 github

It's ReShade VK as mentioned.

Then it's pretty much guaranteed to be a ReShade bug, not a DXVK one.

DLLs