Depth Buffer Detection Modification

  • Posts: 578
3 months 2 weeks ago #1241 by thalixte
Well, so it not seems to be on the Reshade's side, but most on the game's side...In the DX9 tab, is there any differences in the number of depth buffer entries between the "start" level and the others for TDS ?

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

  • Posts: 525
3 months 2 weeks ago - 3 months 2 weeks ago #1242 by lowenz

thalixte wrote: Well, so it not seems to be on the Reshade's side, but most on the game's side...In the DX9 tab, is there any differences in the number of depth buffer entries between the "start" level and the others for TDS ?

Let me see.

The behaviour is the same in DXIW, the intro logo "level" DB is perfect.

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

  • Posts: 525
3 months 2 weeks ago - 3 months 2 weeks ago #1243 by lowenz
First thing first: the intro level DOES NOT NEED "preservation" to get the DB !

So maybe is something related to the shadow system used in TDS/DXIW and only enabled in-game.

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

  • Posts: 405
3 months 2 weeks ago - 3 months 2 weeks ago #1244 by JBeckman
Stencil shadows isn't it? Harder though applied to several objects though maybe the shadow buffer or what it's named is interfering with depth?
D3D11 has some compatibility settings and a listing but I don't think multiple buffers is a think for D3D9 though that could also be part of the issue if it can't be separated.

Though if so that sort of problem should manifest in several other early D3D9 titles unless the format used interferes somewhat or there's some game specific "hack" or quirk in effect possibly even engine specific, wonder if there's any info on that but it might not really help with the issue itself just from however Unreal Engine 2.0 here does depth or shadow mapping.
(And a modified later build of said engine used in Thief 3 and Deus Ex 2)

EDIT: Yeah dynamic stencil shadows like say Fear or Doom 3 not shadow maps or static or baked but ahead of the full shader model 3.0 swing and D3D9c and various methods of shadow filtering and soft shadows like I think Chronicles of Riddick Escape from Butcher Bay was a early one for that.

Hmm but would that in itself have any issues with ReShade or more specifically the depth buffer.

EDIT: Hmm actually D3D8 but wrapped though fan patches then bundle said wrapper, I must be misremembering as I was expecting D3D9b and SM2.0 or 2.0b but that might be a bit too early for these titles.

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

  • Posts: 525
3 months 2 weeks ago - 3 months 2 weeks ago #1245 by lowenz

JBeckman wrote: Stencil shadows isn't it? Harder though applied to several objects though maybe the shadow buffer or what it's named is interfering with depth?
D3D11 has some compatibility settings and a listing but I don't think multiple buffers is a think for D3D9 though that could also be part of the issue if it can't be separated.

Though if so that sort of problem should manifest in several other early D3D9 titles unless the format used interferes somewhat or there's some game specific "hack" or quirk in effect possibly even engine specific, wonder if there's any info on that but it might not really help with the issue itself just from however Unreal Engine 2.0 here does depth or shadow mapping.
(And a modified later build of said engine used in Thief 3 and Deus Ex 2)

EDIT: Yeah dynamic stencil shadows like say Fear or Doom 3 not shadow maps or static or baked but ahead of the full shader model 3.0 swing and D3D9c and various methods of shadow filtering and soft shadows like I think Chronicles of Riddick Escape from Butcher Bay was a early one for that.

Hmm but would that in itself have any issues with ReShade or more specifically the depth buffer.

But the buffer IS THERE, only flattened in values!
See the batroom:

File Attachment:


File Attachment:

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

  • Posts: 525
3 months 2 weeks ago - 3 months 2 weeks ago #1246 by lowenz
"And a modified later build of said engine used in Thief 3 and Deus Ex 2"

No, it's *NOT* "Unreal Engine 2" (UT2003/4, Unreal 2, Raveh Shield, America's Army, etc) it's "Unreal Warfare", Unreal Engine 1.5 for console (and Splinter Cell series from chapter 1 to 4!)
The following user(s) said Thank You: JBeckman

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

  • Posts: 405
3 months 2 weeks ago - 3 months 2 weeks ago #1247 by JBeckman
Yeah I was thinking if it affected distance or the look or if the format interfered by not getting the full depth or range or if it got culled or flattened during rendering for any number of reasons like related to optimization or other means to reduce GPU load, game was running on consoles too and had various restrictions like the smaller levels and loading zones after all.

Trying to find more in-depth info on this but so far there's not much. :)

EDIT: And that's older than expected for the game engine too, hmm good to know but that probably doesn't make things easier either.

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

  • Posts: 525
3 months 2 weeks ago - 3 months 2 weeks ago #1248 by lowenz

JBeckman wrote: Yeah I was thinking if it affected distance or the look or if the format interfered by not getting the full depth or range or if it got culled or flattened during rendering for any number of reasons like related to optimization or other means to reduce GPU load, game was running on consoles too and had various restrictions like the smaller levels and loading zones after all.

Trying to find more in-depth info on this but so far there's not much. :)

EDIT: And that's older than expected for the game engine too, hmm good to know but that probably doesn't make things easier either.

Not only!

As for Splinter Cell series I suspect the "DX7" path can be LESS problematic but it's impossible to force in DXIW and TDS (in Splinter Cell 1 it's possible!)

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

  • Posts: 405
3 months 2 weeks ago - 3 months 2 weeks ago #1249 by JBeckman
Well not having too much luck so far and as can be seen from the images there is some depth data retrieved unlike if there had been a problems with a D3D8 older format used which wouldn't have been supported or a issue with Z buffer and the wrapper used whether it's ReShade D3D8toD3D9 or dgVoodoo2 to D3D11 and then possible compatibility tweaks required though these might interfere with ReShade as well.

Shadow buffer would just show up as a grayscale whereas depth would be a white to black transition even if it's not quite complete here.
And if it was culling or doing anything like that to clear or reset the depth buffer info then only the player hand models would have been visible or things like that.

Hmm sometimes overlays also interfere a bit like UI elements or game effects like a visor but I don't think there's anything here and it would also cut off depth information entirely which isn't happening. Wonder if it would require some additional setting to try and preserve or retain full depth buffer data although I can't find any real info on what the game or game engine is doing either but it's been a few years so a lot of what I find are links to Unreal Engine 4's wiki and documentation which isn't helpful.


EDIT: Well as Crosire said it wouldn't be retrieving only part of the buffer but I wonder if the game is doing something to said depth buffer and the existing D3D compatibility flags whether wrapped to D3D9 or going for D3D11 might not be enough depending on what the games are doing here.

Or if it's something to the Z values when wrapping to a different API.
forum.beyond3d.com/threads/depth-buffer-access.45916/
The following user(s) said Thank You: marco93

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

  • Posts: 1
3 months 1 week ago #1250 by soldars
Who can send me dxgi.dll with this modification

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

  • Posts: 1
3 months 1 week ago #1251 by LeaqK
Hello everyone, i was wondering if someone has been success in depth buffer detection in the game StarCitizen

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

  • Posts: 525
3 months 1 week ago - 3 months 1 week ago #1252 by lowenz
Why in 4.4.x versions "autoselection" of the best DB is gone?

Now it's impossible to play games that switch among several DBs in the same scene, DX Human Revolution DC for example !
Please, bring it back!

DXHR with Marty's MXAO or RTGI is a must!

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

  • Posts: 578
3 months 1 week ago #1253 by thalixte

lowenz wrote: Why in 4.4.x versions "autoselection" of the best DB is gone?

Now it's impossible to play games that switch among several DBs in the same scene, DX Human Revolution DC for example !
Please, bring it back!

DXHR with Marty's MXAO or RTGI is a must!


Auto db selection has not been removed. Have you tried to play with the "Use aspect ratio heuristics" option to see if it solve the pb ?

However, can you test thid one ?
mega.nz/#!DxIClKiC!W7zCUuYCBUQATj4DFvaTC9sz5FibM8FTh2A9-dL6nYg

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

  • Posts: 525
3 months 1 week ago - 3 months 1 week ago #1254 by lowenz
Will test!
Regular 4.4.2 DX11 tab:

File Attachment:


Where is the option?

EDIT: in DX11 that option is maybe missing since months.

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

  • Posts: 578
3 months 1 week ago #1255 by thalixte
Ah, i see... The depth buffer auto selection is enabled when no depth buffer is selected, so try to untick it.

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

  • Posts: 525
3 months 1 week ago #1256 by lowenz

thalixte wrote: Ah, i see... The depth buffer auto selection is enabled when no depth buffer is selected, so try to untick it.

It doesn't seem to work well in DXHR:

Manual pick (but it changes walking/turning around)
File Attachment:


"Automatic - no - pick"
File Attachment:

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

  • Posts: 3632
3 months 1 week ago - 3 months 1 week ago #1257 by crosire
It picked one alright (the last one, can be seen because of the ">" in front), just not the one you want it to pick.

Could probably be improved by tracking the number of draw calls between clears (like we do in D3D9).

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

  • Posts: 578
3 months 1 week ago #1258 by thalixte
When you untick "Copy depth buffer before clearing operation", what happens ?

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

  • Posts: 525
3 months 1 week ago #1259 by lowenz

thalixte wrote: When you untick "Copy depth buffer before clearing operation", what happens ?

Never used that option!

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

  • Posts: 578
3 months 1 week ago #1260 by thalixte

crosire wrote: It picked one alright (the last one, can be seen because of the ">" in front), just not the one you want it to pick.

Could probably be improved by tracking the number of draw calls between clears (like we do in D3D9).


Yes, this could be an idea. Pb is, i am totally overbooked nowadays. Will see what i can do...

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