Welcome, Guest.
Username: Password: Remember me

TOPIC: Depth Buffer Detection Modification

3.1 3 months 2 weeks ago #1

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

:)
Last Edit: 3 months 2 weeks ago by thalixte.
The administrator has disabled public write access.
The following user(s) said Thank You: Alex_outer, brussell, DeMondo, OtisInf, Ryukou36, GP-Unity, BlueSkyKnight, AladinZ

3.1 3 months 2 weeks ago #2

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

:)
Omg! We were only just thankful of the recent depthbuffer detection changes, though Elex didn't benefit. Thankyou! Will try this out.

Edit: Just realised I can't, don't have VS installed. Will wait for binaries :)
Last Edit: 3 months 2 weeks ago by Martigen.
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #3

Martigen, where can i send to you the dll (don't know if it is possible to post it here)?

Some little screenies (w/ super3DDepth and DisplayDepth shaders).
Elex:




Shadow Warrior 2:




Project Cars 2:


Last Edit: 3 months 2 weeks ago by thalixte.
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #4

Thalixte: great stuff :)

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?)
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #5

It's seems that it's not, as i try (with some heuristics, and with the help of your great work in retrieving the number of vertices and drawcalls, even in deferred rendering) to limit as much as i can the number of copyResource, but i cannot test in a less powerfull rig than mine.
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #6

NICE, MAN!

If can can upload a binary we'll surely test it!
Last Edit: 3 months 2 weeks ago by lowenz.
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #7

Here is the link if you want to test: dxgi.dll
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #8

A 32 bit version?
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #9

Here it is: Reshade32.dll
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #10

thalixte wrote:
If you agree with that, may i make a pull request on your github repo ?
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.
Cheers, crosire =)
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #11

Thks Crosire ! Made the pull request. Hope you will find it usefull :)
Last Edit: 3 months 2 weeks ago by thalixte.
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #12

I'm super excited about the possibilities!
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #13

No luck - switching among the several possibilities - with SiN Emergence (an early Source-based game that really needs some indirect shadowing :D ) and MXAO (from the lastest shader package).

Can anyone try (thalixte too) ?
Last Edit: 3 months 2 weeks ago by lowenz.
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #14

The same for Dark Messiah, man, those old Source (like Bloodlines) titles would really benefit of an AO pass.

(an old version of ENB can do that for Source based games, so it's not impossible to retrieve the depth buffer).
Last Edit: 3 months 2 weeks ago by lowenz.
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #15

Are those games d3d11 games ? The changes only impact d3d11 games.
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #16

No, D3D9.

But man, I CAN ALREADY LOVE YOU :D
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!
Last Edit: 3 months 2 weeks ago by lowenz.
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #17

The 2 screenshots:


The administrator has disabled public write access.

3.1 3 months 2 weeks ago #18

You're welcome ;) I suggest you to use the DisplayDepth shader in order to better see the depth buffer...
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #19

Can't wait to try this with Bioshock 2 Remastered.

UPDATE: Didn't work. :(
Last Edit: 3 months 2 weeks ago by robgrab.
The administrator has disabled public write access.

3.1 3 months 2 weeks ago #20

It seems that the pass when (where?) you can retrieve the DB changes (First<->Second) on the camera angle/position.





How is this possible? Implementation issue of yours or game strange "feature" ? :D
Last Edit: 3 months 2 weeks ago by lowenz.
The administrator has disabled public write access.