Depth buffer detection modifications
- thalixte
- Topic Author
matsilagi wrote: Retested with HL2 (Which is the same as L4D2)
It is broken now, the prevalent depth buffer is the skybox one, when i turn on the flashlight, the depth buffer from the room i am in appears, but in a small square.
You mean that with the previous dlls, HL2 worked better ?
For now, I'll revert the d3d9 file to the prev one and use it.
PS: If you wanna try for yourself, both HL2 and Dark Messiah will suffice.
- robgrab
GOOD news:
- I was finally able to find a setting that prevents the flickering while aiming your weapon.
- This latest version also got rid of the bug where the depth buffer would stop working immediately after raising your weapon.
BAD News:
- So far I've come across three areas where the depth buffer doesn't work at all.
1) The first area is where you're supposed to take the boat across the lake.
2) The second area is the sewers of the castle with all of those annoying invisible bugs.
3) The third area is once you arrive on the island. The depth buffer comes back once you get inside the building but you have to restart the game to get it back.
- conan2k
thalixte wrote: Really cool For the games that lost the depth buffer with my previous release, it should now be fixed. Could you please retest...
Well, that's interesting. With these new "fixed" DLLs, the depth buffer access is broken in Left 4 Dead 2 (I haven't been able to find values that would work in this game). However, The Witcher: Enhanced Edition and Fallout 3 GotY now works perfectly after selecting "DepthBufferClearingNumber = None" and "DepthBufferClearingFlagNumber = 2".
Besides, I've noticed an annoying issue in The Witcher that causes the game rendering to break (missing shadows, depth buffer access is lost completely, probably other issues too) to the extent that the game restart is required in order to fix it (i.e. Reload doesn't help). The problem happens when "DepthBufferClearingNumber = None" is active and "DepthBufferClearingFlagNumber" is set to any value between 5 and 9.
This makes me wondering what exactly has been fixed in the latest DLLs and whether we can have a mix of both worlds?
- Chavolatra
- conan2k
1) Medal of Honor (2010)
Works fine after selecting "DepthBufferClearingNumber = None" and "DepthBufferClearingFlagNumber = 6"!
2) Painkiller: Hell & Damnation
Works fine after selecting "DepthBufferClearingNumber = None" and "DepthBufferClearingFlagNumber = 6"!
3) Spec Ops: The Line
The depth map is retrieved after selecting "DepthBufferClearingNumber = None" and "DepthBufferClearingFlagNumber = 6" but it's shifted up (obviously, all depth-related effects are shifted too). I believe this shifting is happening because of the "Letterbox" effect being forced on displays with 16:10 aspect ratio. Because when the "Letterbox" effect is removed by correcting the aspect ratio via the FlawlessWidescreen tool for example, the problem is gone. So, probably it won't hurt to have an option that would "center" the retrieved depth map on the screen.
4) Splinter Cell: Conviction
No matter what settings are selected, the retrieved depth map is always empty (black). I've double-checked that AA is disabled everywhere. Could it be that something else is blocking the depth buffer access in this game?
5) Flashback
Works fine after selecting "DepthBufferClearingNumber = None" and "DepthBufferClearingFlagNumber = 6"!
- OtisInf
I see this when I use my camera mod for titanfall 2 ( github.com/FransBouma/InjectableGenericC...r/Cameras/Titanfall2 ) , which allows you to timestop the game/ move the camera around etc. so that might have an impact on this. I'm a little constrained on time at the moment, but if I have some left I'll try to look into this.thalixte wrote:
OtisInf wrote: There's still a problem with the system you implemented, but perhaps it's titanfall2 specific: when I enable DisplayDepth and the settings you suggested, I get a view of a filled depth buffer. However when I move the camera, I keep that frame, the depth buffer captured isn't updated. So it might be TF2 uses a series of buffers and we're just looking at one which isn't in use anymore (and therefore not updated by the game) OR your code doesn't update the texture from the depth buffer each frame, hence we keep old data in the one we're working with inside reshade.
Hopefully this is enough for you to see what's going on and what might be the problem
Oddly enough, i don't have this behaviour. When i move the camera, the depth buffer is correctly updated. I update it on each frame, but as i kept the online protection of the official release, if Reshade detects network traffic, the depth buffer is not updated, which can lead to depth texture freezing or flickering. I personally always play offline.
Do you use specific settings for TitanFall 2 ? As you have the skills, maybe the best would be for you to make a step by step debug in the depth buffer detection process, retrieving the last version of the master branch in the Crosire repo. The modifications i made for dx11 impact runtime.cpp, impacted d3d11_runtime.cpp and d3d11_devicecontext.cpp, and draw_call_tracker.cpp.
- BlueSkyKnight
OtisInf wrote: I see this when I use my camera mod for titanfall 2 ( github.com/FransBouma/InjectableGenericC...r/Cameras/Titanfall2 ) , which allows you to timestop the game/ move the camera around etc. so that might have an impact on this. I'm a little constrained on time at the moment, but if I have some left I'll try to look into this.
Try my settings Otisinf.
I had issues like yours with the depth buffer clearing till I set these settings in game.
Also, the other question I have is with your cam mod for Wolfenstein 2 The new colossus. I am wondering if you are able to script it where the player cam moves in a side to side. But, keeps it's able to keep its orientation. It would need to blank out a frame every time it shifts. So frame rate would need to be high.
Like this.
My end goal is a stereoscopic cam that would not be tied down by shader hacking. My Idea is simple to have one single cam that constantly shifts fast enough where enough information is given to each eye. If you have time come message me on discord. I Tried out your Wolfenstine Cam Mod BTW. It was fun to use.
Do you think this is possible?
I would love to talk to you. Since I have some questions and I don't want to derail this board.
- thalixte
- Topic Author
OtisInf wrote: I see this when I use my camera mod for titanfall 2 ( github.com/FransBouma/InjectableGenericC...r/Cameras/Titanfall2 ) , which allows you to timestop the game/ move the camera around etc. so that might have an impact on this. I'm a little constrained on time at the moment, but if I have some left I'll try to look into this.
Ok, so i will test with your camera mod to see what is conflicting. I am also a little constrained for the moment, so as soon as i find time, will check it
- thalixte
- Topic Author
conan2k wrote:
thalixte wrote: Really cool For the games that lost the depth buffer with my previous release, it should now be fixed. Could you please retest...
Well, that's interesting. With these new "fixed" DLLs, the depth buffer access is broken in Left 4 Dead 2 (I haven't been able to find values that would work in this game). However, The Witcher: Enhanced Edition and Fallout 3 GotY now works perfectly after selecting "DepthBufferClearingNumber = None" and "DepthBufferClearingFlagNumber = 2".
Besides, I've noticed an annoying issue in The Witcher that causes the game rendering to break (missing shadows, depth buffer access is lost completely, probably other issues too) to the extent that the game restart is required in order to fix it (i.e. Reload doesn't help). The problem happens when "DepthBufferClearingNumber = None" is active and "DepthBufferClearingFlagNumber" is set to any value between 5 and 9.
This makes me wondering what exactly has been fixed in the latest DLLs and whether we can have a mix of both worlds?
Yes, it is very interesting. It seems that my mistake have enabled something with those games. I have a little idea, but i need to prospect it. Thks for your precious infos
To investigate, what were your working settings with those games (L4D2, for instance). Was it in Post processing mode ?
- conan2k
thalixte wrote: To investigate, what were your working settings with those games (L4D2, for instance). Was it in Post processing mode ?
There is no proper depth buffer access in the "Post-processing" mode (i.e.the retrieved depth map is either white or contains only parts like UI or main character hands/weapon) for all of games I've tested/listed in this topic (including L4D2). So, everything is tested in the "Before clearing" mode and I'm switching to the "Post-processing" mode only when I need to see if any visual artifacts are introduced by "Before clearing" settings I've selected.
Hope this helps and thanks for your great work!
- conan2k
1) Alien Rage - Unlimited
Works fine after selecting "DepthBufferClearingNumber = None" and "DepthBufferClearingFlagNumber = 6"!
2) Deadfall Adventures
Works fine after selecting "DepthBufferClearingNumber = None" and "DepthBufferClearingFlagNumber = 5"! But, there is "zoom in / out" UI issue which has been fixed for other games previously. I.e. when trying to scroll the list of effects by the mouse wheel, the ReShade UI is zoomed in/out instead. This UI issue doesn't reproduce with the original ReShade.
3) Blackguards
Pretty strange behavior in this game. The depth map is retrieved after selecting "DepthBufferClearingNumber = None", "DepthBufferClearingFlagNumber = 6", and "RestrictDepthBufferDimensions = 0" but it's rotated by ~70 degrees clockwise (of course, it could just appear to be a "partial / broken" depth map but it's difficult to say due to the type of game).
4) Blackguards 2
No matter what settings are selected, the retrieved depth map is always empty (black). I.e. this game has the same behavior as Splinter Cell: Conviction (that I've tested and reported earlier).
5) Tom Clancy's Ghost Recon: Advanced Warfighter
No matter what settings are selected, the retrieved depth map is always empty (white or black).
6) Tom Clancy's Ghost Recon: Advanced Warfighter 2
When selecting "DepthBufferClearingNumber = 0" and "DepthBufferClearingFlagNumber = 6", the depth map is retrieved but it contains objects which should actually be invisible (and should not be rotated as they appear in the depth map). Besides, after changing "DepthBufferClearingFlagNumber" to other values, the depth map becomes white but the mentioned "redundant" objects remain visible.
- Uncle Crassius
- Nerrel
robgrab wrote: I tried the new dll files with RE4.
...
BAD News:
- So far I've come across three areas where the depth buffer doesn't work at all.
1) The first area is where you're supposed to take the boat across the lake.
2) The second area is the sewers of the castle with all of those annoying invisible bugs.
3) The third area is once you arrive on the island. The depth buffer comes back once you get inside the building but you have to restart the game to get it back.
I had this as well. When I booted up Assignment Ada (which starts right at the island), MXAO was not active and the debug view showed nothing. There are a few cutscenes that also don't work, or that only work for certain camera points. The codec calls don't seem to ever work. Going through the cutscene viewer, the scene where Krauser and Saddler are talking for the first time demonstrates the problem pretty well. Some shots will work, then a different angle won't, then the next cut brings MXAO back on. Most scenes seem to be alright, though.
Have you had any crashing, robgrab? I would get crashes after about 15 minutes of running the game with MXAO and SMAA on in ReShade.
- robgrab
Nerrel wrote: Have you had any crashing, robgrab? I would get crashes after about 15 minutes of running the game with MXAO and SMAA on in ReShade.
Sounds like you might be running out of memory. Have you tried using the 4GB patch ? It should fix any problems related to memory. They recommend using this if you run the HD Texture Pack . I've been spending a LOT of time tweaking my preset to get it just the way I like it and I haven't encountered a single crash and that's running it at 3440x1440 resolution.
- lowenz
Did you disable "Dynamic Ambient Occlusion" setting?conan2k wrote: 4) Splinter Cell: Conviction
No matter what settings are selected, the retrieved depth map is always empty (black). I've double-checked that AA is disabled everywhere. Could it be that something else is blocking the depth buffer access in this game?
- lowenz
With which values for the DB retrieval parameters?Uncle Crassius wrote: Managed to get it working in Styx, but only with Distortion off and dynamic shadows set to low. Otherwise everything is transparent. Weird little effect.
- Uncle Crassius
lowenz wrote:
With which values for the DB retrieval parameters?Uncle Crassius wrote: Managed to get it working in Styx, but only with Distortion off and dynamic shadows set to low. Otherwise everything is transparent. Weird little effect.
Depth buffer clearing number: Fourth
Flag number: 1
Important: I had only MXAO installed, no other shader. Tried it out with some others just now and am getting the static depth buffer image overlay issue™ as well. Will do further testing.
- lowenz
Styx version? 1.02 or other ones?Uncle Crassius wrote:
lowenz wrote:
With which values for the DB retrieval parameters?Uncle Crassius wrote: Managed to get it working in Styx, but only with Distortion off and dynamic shadows set to low. Otherwise everything is transparent. Weird little effect.
Depth buffer clearing number: Fourth
Flag number: 1
- Uncle Crassius
lowenz wrote:
Styx version? 1.02 or other ones?Uncle Crassius wrote:
lowenz wrote:
With which values for the DB retrieval parameters?Uncle Crassius wrote: Managed to get it working in Styx, but only with Distortion off and dynamic shadows set to low. Otherwise everything is transparent. Weird little effect.
Depth buffer clearing number: Fourth
Flag number: 1
Just edited my post, but just to make sure:
I had only MXAO installed, no other shader. Tried it out with some others just now and am getting the static depth buffer image overlay issue™ as well. Will do further testing.
And yes, version 1.02.
Edit: Dragging MXAO all the way down on the list did the trick. Had to restart the game, though. Capricious lil bugger.
Edit 2: It's working fine for the most part, depth buffer access gets disabled occasionally, though, sometimes depending on camera orientation, but only in certain areas.