Depth buffer detection modifications
- thalixte
- Topic Author
I made some modifications in the Reshade code in order to enable depth buffer in games where it does not actually work (i made it because i am absolutely fan of the superDepth3D shader made by BlueSkyKnight, and the MXAO shader by MartyMcFly).
For instance in Elex, TitanFall 2, Project Cars 2, Shadow Warrior 2, Shadow Of War (full screen mode), Agents Of Mayhem...
What i did is retrieve the depth buffer texture at different stages, other than the rendering one. I retrieve the depth buffer texture at Output Merger state, or just before the game clears the buffer, at the clearDepthstencilView stage, I make a copy of this texture, then pass it to the draw_call_tracker instance, and retrieve it at the select_depthstencil_replacement stage.
In order to ensure compatibility with the existing features, i added an extra configuration tab, named "depth buffer detection settings", where the user can choose the depth buffer detection technique to use with the game (old post processing technique, before the game clears the depth buffer, or at the Output Merger stage).
If you agree with that, may i make a pull request on your github repo ?
My own repo is here: github.com/Thalixte/Reshade
- Martigen
Omg! We were only just thankful of the recent depthbuffer detection changes, though Elex didn't benefit. Thankyou! Will try this out.thalixte wrote: Hi Crosire !
I made some modifications in the Reshade code in order to enable depth buffer in games where it does not actually work (i made it because i am absolutely fan of the superDepth3D shader made by BlueSkyDefender, and the MXAO shader by MartyMcFly).
For instance in Elex, Project Cars 2, Shadow Warrior 2, Shadow Of War (full screen mode), Agents Of Mayhem...
What i did is retrieve the depth buffer texture at different stages, other than the rendering one. I retrieve the depth buffer texture at Output Merger state, or just before the game clears the buffer, at the clearDepthstencilView stage, I make a copy of this texture, then pass it to the draw_call_tracker instance, and retrieve it at the select_depthstencil_replacement stage.
In order to ensure compatibility with the existing features, i added an extra configuration tab, named "depth buffer detection settings", where the user can choose the depth buffer detection technique to use with the game (old post processing technique, before the game clears the depth buffer, or at the Output Merger stage).
If you agree with that, may i make a pull request on your github repo ?
My own repo is here: github.com/Thalixte/Reshade
Edit: Just realised I can't, don't have VS installed. Will wait for binaries
- thalixte
- Topic Author
Some little screenies (w/ super3DDepth and DisplayDepth shaders).
Elex:
Shadow Warrior 2:
Project Cars 2:
- OtisInf
It's actually a great idea to pull the buffer from these other two locations. Isn't it taxing though to copy the textures around at that stage (as in: loss in performance?)
- thalixte
- Topic Author
- lowenz
If can can upload a binary we'll surely test it!
- thalixte
- Topic Author
- lowenz
- thalixte
- Topic Author
- crosire
Go ahead! The worst that can happen is that I don't agree with how things are done and will review and/or modify accordingly or refuse the pull request for some reason. But I'm always happy to see new changes and proof that people actually do useful stuff with the ReShade codebase! So, yes please, make a pull request.thalixte wrote: If you agree with that, may i make a pull request on your github repo ?
- thalixte
- Topic Author
- robgrab
- lowenz
Can anyone try (thalixte too) ?
- lowenz
(an old version of ENB can do that for Source based games, so it's not impossible to retrieve the depth buffer).
- thalixte
- Topic Author
- lowenz
But man, I CAN ALREADY LOVE YOU
With "second pass" we can now apply MXAO to Deus Ex Human Revolution!
screenshotcomparison.com/comparison/133347
But there's a strange behaviour! The pass number to choose to see the effect applied is angle (normal?) dependent!
As you can see in the screenshots above the pass is "Second", but *turning* in that same room need to switch to "First" to see the effect present (or applied?)
Still we all owe you man! IT'S GREAT! DX with MXAO! A dream come true!
- lowenz
- thalixte
- Topic Author
- robgrab
UPDATE: Didn't work.
- lowenz
How is this possible? Implementation issue of yours or game strange "feature" ?