Depth Buffer Question For Crosire!!

  • NoMansReshade
  • Topic Author
More
7 years 1 week ago #1 by NoMansReshade Depth Buffer Question For Crosire!! was created by NoMansReshade
What does Reshade hook into in order to gain access to a game's depth buffer? Depth buffer support seems pretty inconsistent, and I was wondering how hard it would be to modify the way a depth buffer is gathered on a per-game basis. Certain games have no depth buffer support at all, some have partial support (ex: only captures gun's depth, only captures UI, etc.)

Considering you're pretty much the only one that knows what code is what: Could you point me in the right direction as to where the depth buffer hook is in the source code?

Please and thank you for your time,
NoMansReshade.

Please Log in or Create an account to join the conversation.

  • yytsslnReshade
More
7 years 1 week ago #2 by yytsslnReshade Replied by yytsslnReshade on topic Depth Buffer Question For Crosire!!
me too.I try to use Reshade 3.0.6 in Assassin's creed 2 ,call of duty 8,medal of honor airbone,but in Assassin's creed 2,the character doesn't have depth buffter , in medal of honor airbone only the gun has depth buffter,in ,call of duty 8 there is no depth buffer.I turn off all AA in game,but nothing chage,I don't know why?But call of duyt 2 and 5,they all have depth buffer only you turn off AA in game,they all have nice DOF.

Please Log in or Create an account to join the conversation.

  • crosire
More
7 years 1 week ago #3 by crosire Replied by crosire on topic Depth Buffer Question For Crosire!!
Example D3D11: ReShade hooks all draw call methods ( github.com/crosire/reshade/blob/master/s...d11_runtime.cpp#L586 "d3d11_runtime::on_draw_call") and the depth stencil state getter and setter ( github.com/crosire/reshade/blob/master/s...d11_runtime.cpp#L615 "d3d11_runtime::on_set_depth_stencil") of ID3D11DeviceContext. Everytime those are called by the game, ReShade stores information about the amount of triangles that were drawn and which depth buffer is currently bound. Later in the frame it then uses that information to try and find the one buffer that is most likely containing scene depth information ( github.com/crosire/reshade/blob/master/s...11_runtime.cpp#L1053 "d3d11_runtime::detect_depth_source").
Modifying the algorithm in the latter method will change the way ReShade detects the correct depth buffer. The values in there are currently chosen in a way that works well in most cases. But for some games they need to be different. For some games this way of detection will probably never work at all.

Please Log in or Create an account to join the conversation.

  • NoMansReshade
  • Topic Author
More
7 years 1 week ago #4 by NoMansReshade Replied by NoMansReshade on topic Depth Buffer Question For Crosire!!
Damn! Thank you so much @Crosire, I'll look into this!

Please Log in or Create an account to join the conversation.

  • yytsslnReshade
More
7 years 3 days ago - 7 years 3 days ago #5 by yytsslnReshade Replied by yytsslnReshade on topic Depth Buffer Question For Crosire!!
Oh,no :( !I understood,and thank you.@Crosire
Last edit: 7 years 3 days ago by yytsslnReshade.

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.