[Release] Pcsx2 with depth buffer access
- Boulotaur2024
- Topic Author
Valkyrie Profile 2 with Marty McFly's Ground Truth AO implementation running in PCSX2
This is a dirty hack of Reshade made to help getting access to depth buffer in games emulated by Pcsx2 emulator which is otherwise hard and really quirky.
The emulator does expose a depth buffer (not always but often), sometimes filled with the wrong data... but sometimes actually decent to use.
I will push the changes to my Reshade Github if anyone wants to see how it's done (it is naughty )
Instructions :
- Install latest Pcsx2 SVN build
- Install Reshade as you would normally do
- Download and replace your existing Reshade opengl32.dll with the following alternative opengl32.dll : mega.nz/#!vcsiDI6A!AkGWkVRQkJEelOYa7quAOI1cOxHfU-HuDBcS1CnVrTI
- Download modified qUINT shaders HERE and drop them in the "\reshade-shaders\Shaders\" subfolder
- Run the emulator once to make sure Reshade is working at all. Also please select OpenGL (Hardware) renderer in GSdx
- Run pcsx2 again and select "pcsx2" in the "Hacks for custom apps" dropdownlist - in the Opengl tab in Reshade :
- In Reshade.ini, set RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN to 1
- Atlus games are not working at all (Persona3, 4, Nocturne...)
- Metal Gear solid 2 does not work : (
- There is a more or less visible latency between the ssao buffer and the backbuffer
- Some games (Okami, Silent Hill 4, Fatal Frame... and maybe more) need a real boost to the depth output so if the resolution parameters are fine and you still don't see any ssao showing, in qUINT_common.fxh set it to :
float depth = tex2Dlod(sDepthBufferTex, float4(uv, 0, 0)).x * 100000;
- Clicking on Reset upscale settings is a good way to reset & autodetect resolutions parameters per game.
Additional resizing can be done with the Stretch mode selector
Please Log in or Create an account to join the conversation.
- Niko of Death
Please Log in or Create an account to join the conversation.
- Nerd
Please Log in or Create an account to join the conversation.
- anontsuki
I tried your initial release of this modified reshade and had .... limited results. The main issue I had was in the depth buffer detection tab, I'd see some buffer things loading in and out incredibly quick, honestly like 100 times a second. I don't know the terminology of these things, but typically you'd select one of those boxes that's the depth buffer, those boxes and ranges or whatever weren't staying put.
This newer version doesn't seem to load/work properly for me, when named d3d11.dll, it doesn't load and when opengl32.dll, I get the famed "Can't Find Suitable PixelFormat" issue.
Also, if I'm not mistaken, to get ReShade loading with PCSX2 in general, you need to create a fix for PCSX2, since PCSX2 doesn't load the dll as one would expect. There was some talk about it on Github a while back, a guy created a fix that allowed for PCSX2 to forcefully load up d3d11.dll. (And you can create your own fix using Windows Compatibility Administrator Kit)
Would love to see how this progresses.
I would recommend calling your custom dll something else though from just d3d11.dll or opengl32.dll, maybe a version number and something that makes it obvious it's for PCSX2, like "PCSX2 DB ver x.x.dll" or something.
Please Log in or Create an account to join the conversation.
- Boulotaur2024
- Topic Author
EDIT : If you still want to use D3D11, you can do so by renaming opengl32.dll to dxgi.dll
And for those of you that have issues with Pcsx2 not loading Reshade at all, use this fix :
reshade.me/forum/troubleshooting/4649-so...11-and-reshade#29813
For D3D11 the key to success is ALT-tabbing several times until you get the depth buffer showing : this is a timing issue I guess.
You can completely disregard the D3D11 tab, I don't use the code path Thalixte made because it's not needed here.
I would recommend using OpenGL and relative dll for more stability and ease of use : once loaded the DB shows immediately unlike the D3D11 version
Please give it a try (also the compatibility is a bit better)
Please Log in or Create an account to join the conversation.
- anontsuki
I'll give the DLL's another try and it's good to know that I don't need to mess with the Depth Tab, guess things will be obvious or not if they work.
Do you have any idea why OpenGL32.dll was giving me that dumb error though? That's something that old versions of ReShade use to say but was fixed in.... 4.1? or something, so .
Please Log in or Create an account to join the conversation.
- Gynther477
"GS plugin failed to open. Your computer may have insufficient resources, or incompatible hardware/drivers."
However if I use your DX11 dll it works fine with the GSDX DX11 hardware, and the normal opengl32.dll that comes with reshade works fine as well with GSDX opengl, so I'm not sure what I do wrong. From what I tested in ratchet and clank, I can get depth buffer acces in dx11 by manually selecting it in the DX11 tab in reshade, but it isn't optimal since the depth buffer is misaligned, and I guess I need the opengl plugin to alter the reshade.ini to add the extra options that i can adjust the depth buffer height and width (atleast that's what I assume the dll will do).
Please Log in or Create an account to join the conversation.
- Boulotaur2024
- Topic Author
I guess it crashed because I was not using the same Windows SDK version as Crosire's.
He's using 10.0.17763.0 while I was using 10.0.18362.0...
Well it's a bit too early to tell now but right now it's my best guess...
Please Log in or Create an account to join the conversation.
- anontsuki
Please Log in or Create an account to join the conversation.
Amazing to see ReShade working on PCSX2, hopefully you can expand that list and make even more emus compatible, this is waay more than the GS shader can offer for sure!
Please Log in or Create an account to join the conversation.
- Talley Rand
Do you know what may be the issue here? I've set everything according to the instruction in the first post.
Examples of the output:
Please Log in or Create an account to join the conversation.
- Boulotaur2024
- Topic Author
I never tested it with NVIDIA so I'm unsure about the results.
Judging from the screens the glBlitFramebuffer call might completely fail on NVIDIA, thus catching only a small subset of the screen.
SH4 work fine here for sure on my old AMD HD 7900. Pretty sure SH3 likewise (more or less same engine)
Any better results with some other games... ?
BTW has anyone here got it working like... just fine... or not ?
Please Log in or Create an account to join the conversation.
- anontsuki
DisplayDepth doesn't show anything, SMAA depth debug doesn't show anything. Nothing works on my end .
GTX 1070 here.
Please Log in or Create an account to join the conversation.
- otherman
Please Log in or Create an account to join the conversation.
- Talley Rand
What pcsx2 build are using, btw?
Please Log in or Create an account to join the conversation.
- Boulotaur2024
- Topic Author
Hopeefully tomorrow I can test it at work, my desktop pc has a gtx 750.
I spent a good portion of the day bypassing the proxy to download... everything to boot it on my rig at work.
Funnily enough, there's no displacement/misalignment issue either with Intel Integrated graphics card.
So if you're a happy owner of Intel Integrated graphics, then you are a lucky man : it works ! Just like with AMD
It's a shame OpenGL can be interpretated so "loosely" from a vendor to another.
A call has its rules and expected results, it shouldn't vary so much from AMD to NVIDIA.
Oh well...
Please Log in or Create an account to join the conversation.
- anontsuki
In some ways, I hope it's an Nvidia related problem, but then again, if it is, that sucks and will probably make things more difficult .
Please Log in or Create an account to join the conversation.
- MrCassidy
So i followed your instructions to a T, and I found that your DX11 depth buffer plugin for reshade works decently well with Square Enix/Soft games. And yes, I'm on a GTX 1070. Here are some screen shots to show my results.
But I noticed on KH 2 that it's just slightly above the bottom of the screen, and when applied to the actual game looks pretty Janky.
Any idea why this might be happening, and how I might fix it?
But yes... I can also confirm what everyone else is saying when it comes to the open gl plugin. it's a shame since that seemed like the one that would work for KH2... aww well. Any suggestions?
Please Log in or Create an account to join the conversation.
- StuDentBR
Please Log in or Create an account to join the conversation.
- Boulotaur2024
- Topic Author
I finally managed to get it working fine on NVIDIA !
abload.de/img/captureblj0g.jpg
For now I'll let people choose between NVIDIA or AMD dll but I'm pretty sure the NVIDIA one works with both cards, just in case...
I dropped entirely support for D3D11 as it was... buggy, now it's all about OpenGL (even though I hate everything about it )
Enjoy
Please Log in or Create an account to join the conversation.