doitsujin / dxvk

Vulkan-based implementation of D3D9, D3D10 and D3D11 for Linux / Wine
zlib License
12.3k stars 786 forks source link

Causes flickering depth buffer in TES: Oblivion #3918

Open adamnorbacker opened 3 months ago

adamnorbacker commented 3 months ago

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

K0bin commented 3 months ago

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.

Blisto91 commented 2 months ago

@adamnorbacker Friendly ping

Blisto91 commented 1 month ago

@adamnorbacker double friendly ping

tiramoi commented 1 week ago

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

K0bin commented 1 week ago

And which ReShade shader causes that?

tiramoi commented 1 week ago

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

tiramoi commented 1 week ago

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

tiramoi commented 1 week ago

sdlkjalsdjlakdjlkdla

tiramoi commented 1 week ago

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.

tiramoi commented 1 week ago

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.

K0bin commented 1 week ago

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

Blisto91 commented 1 week ago

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](https://github.com/doitsujin/dxvk/assets/47954800/7146b8c5-13be-445e-aa53-1ea202755a70) AMD ![image](https://github.com/doitsujin/dxvk/assets/47954800/d72b53f5-d127-4a7c-b35b-c99f3123f658)
tiramoi commented 1 week ago

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

I have shaders with reshade. ReShadePreset.zip

tiramoi commented 1 week ago

Also my reshade ini and log i guess reshade.zip

Blisto91 commented 1 week ago

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

tiramoi commented 1 week ago

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

my bad. reshade.zip

Blisto91 commented 1 week ago

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

tiramoi commented 1 week ago

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

K0bin commented 1 week ago

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

tiramoi commented 1 week ago

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?

Blisto91 commented 1 week ago

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

tiramoi commented 1 week ago

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

Oblivion_d3d9.zip is it this?

K0bin commented 1 week ago

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

tiramoi commented 1 week ago

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.

Blisto91 commented 1 week ago

@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.

tiramoi commented 1 week ago

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

How do I use d3d9 along with dxvk?

tiramoi commented 1 week ago

@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

Blisto91 commented 6 days ago

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.

adamnorbacker commented 6 days ago

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?

Blisto91 commented 6 days ago

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

adamnorbacker commented 6 days ago

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.

Blisto91 commented 6 days ago

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.

K0bin commented 6 days ago

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.