[SOLVED] DisplayDepth not working on AC Origins
- Essylt
-
Topic Author
I know some of you succeeded in using DIsplayDepth (because I saw some screenshots with it) but It doesnt work on my two computers so...do I need to do something in special to make it work ? It works on Nier Automata but not on AC Origins so I wonder why.
Thank you
Please Log in or Create an account to join the conversation.
- OtisInf
-
On the settings tab, set RESHADE_DEPTH_INPUT_IS_REVERSED to 1, and RESHADE_DEPTH_INPUT_IS_LOGARITHMIC to 1, then go back to the HOME tab and click 'Reload'. DisplayDepth will then show the depth buffer properly (black up front, white in the back)
(although logarithmic depthbuffer or not doesn't really make things change a lot in ACO)
Please Log in or Create an account to join the conversation.
- Essylt
-
Topic Author

See you on Flickr

Please Log in or Create an account to join the conversation.
- Uncle Crassius
-
Edit: Otis kinda sounds like it's working for him, at least the part with logarithmic depth.
Please Log in or Create an account to join the conversation.
- JBeckman
-
Please Log in or Create an account to join the conversation.
- Uncle Crassius
-
This is with Logarithmic set to 1 in the preprocessor settings leading to heavy flickering:
Setting only Reversed to 1 does the trick:
Reversed and Logarithmic together looks equally wonky:
Please Log in or Create an account to join the conversation.
- Uncle Crassius
-
Please Log in or Create an account to join the conversation.
- OtisInf
-
Reshade at the moment picks the wrong depth buffer sometimes, which makes it end up empty. It's currently unclear why this happens. Debugging it didn't reveal the cause, only that it picks the wrong buffer. Next couple of days I have abit of time and will try again to see if I can dig up some more info about what's going on and hopefully that'll lead to something which will reshade pick the right buffer in all cases.

Please Log in or Create an account to join the conversation.
- Uncle Crassius
-
My questions about Logarithmic Depth still stands, though.
Please Log in or Create an account to join the conversation.
- Prodousier
-
Please Log in or Create an account to join the conversation.
- JBeckman
-

As for Origins the only flicker I've noticed with depth effects have been the temporal AA since it works by using a slight jittering effect, I do primarily use a modified version of ReShade working through SpecialK however which has a few workarounds for games relying on multi-threaded rendering and working around shader effects such as fog and most recently also various solutions for handling UI elements. Based on 3.0.8 and I don't think the current version has merged in the 3.1.0 commits yet (Those that it could use.) though the only "downside" is that it's dependent on SpecialK itself and it can be a bit overwhelming to set up since there's so many different options.

EDIT: It seems to work pretty much the same in 3.1.0 though the UI elements need to be off first (Such as from the camera tools or just using the photo mode and waiting a few seconds.) since they otherwise interfere with the depth detection.
farm5.staticflickr.com/4639/24462960617_81bf92bbeb_o.jpg
farm5.staticflickr.com/4690/39326428311_5892e4f4f3_o.jpg
farm5.staticflickr.com/4647/24462960237_c4dc02d6a8_o.jpg
And while not the easiest to capture in a screenshot the temporal effect and jitter can be seen in the bush to the side of this temple building.
Please Log in or Create an account to join the conversation.
- OtisInf
-
Please Log in or Create an account to join the conversation.
- JBeckman
-
Updates to SpecialK and it's ReShade build can also periodically change or break compatibility and as you said the ReShade version itself is pretty stripped down and reliant on SpecialK to function at all though it's also possible to run both the custom and standard version of ReShade through SpecialK so I keep both around.
(And some games such as Ghost Recon Wildlands thanks to EAC doesn't really play nice with custom injected .dll files making the official version of ReShade the only alternative short of circumventing EAC and playing offline.)
There has also been a few commits to ReShade after the 3.1.0 release but I don't know how important these are although some of the commits look interesting for version 3.1.1 or what the next release will be called.

github.com/crosire/reshade/commits/master
I still have quite a lot to learn on how some of these things work, it's mostly from following discussions and such and then trying updated versions in games and seeing how it works. ReShade has come quite a long way now and is working pretty well for the most part for being a generic injector meant to just work without any specialized compatibility tweaks or a per-program internal compatibility profile or similar setup which I find really impressive.
Though it also does mean that some games that differ from the norm are more susceptible to breaking when it comes to compatibility or the way depth detection and the like is done. Focus on newer API's and methods such as the increase in compute shader usage (AC: Origins has a ton of these.) might also require some work although it'll be a while yet before we see DirectX 12 or Vulkan taking over from the existing DirectX 11 graphics API though DX11 is also seeing a few updates here and there although I am not all too sure how much of these are used in the actual games.
(I know D3D11.1 is a requirement for a few titles which affects Windows 7 and it's up to version 11.4 now but I don't think many games explicitly supports or makes use of these newer features.)
EDIT: Something like this.
steamcommunity.com/sharedfiles/filedetails/?id=1233865979
Whereas the official version of ReShade is pretty simple to set up and what I use for the majority of the games I have installed currently for the games running through SpecialK it's possible to do that but also go a bit further using the shader functionality to bypass UI elements and effects such as fog.
I see it as a interesting alternative but both versions have their uses and setting up SpecialK can be complicated for a few games in addition to other possible compatibility problems that ReShade mostly manages to avoid.
3.0.8 and newer version of ReShade also fixes several bugs and issues in addition to some possible performance bottlenecks and later versions will hopefully fix even more as Crosire finds time to continue development, open source also allows for other people to contribute but with how complex the ReShade code base no doubt is there's not been all that many commits to the project yet but there's been some at least. Same also goes for the actual shader repository which also sees periodic updates.
For this game? Well something with the UI elements seems to periodically block the depth buffer or interfere with it's compatibility.
One of the compute shaders also occasionally confuses the algorithm ReShade uses to determine the depth buffer. (More on that from OtisInf's post in the 3.1 topic.)
And there's a possibility of the temporal AA routine and the way it jitters to also interfere with depth effects causing a noticeable flicker or shimmer as a result.
EDIT: Also not too sure how easily these are to work around or fix, depth being cut off or affected by overlays isn't anything new but disabling the HUD isn't really the answer since these elements are kinda useful for regular gameplay. HUD toggle from the camera tools might be the best alternative for this for now.
AA might have to be disabled and then either rely on injected FXAA or SMAA from ReShade or go downsampling if you have a strong enough GPU for it.
And that compute shader might require changes for ReShade itself so it gets the correct depth buffer hooked.
EDIT: But like I said I'm no expert or anything, it's interesting to read up on though and the game is a good initial case for how future titles might work since the Anvil Next engine here is pretty advanced from what I can tell. (And also quite demanding.

Makes for a good trial and test game though game engines such as Frostbite, UE4 and Cry-Engine or even Unity are also advancing with each update.
But it'll be a while before games actually use these later versions of these engines and most in-house "AAA" style development tends to be on custom engines.
(Whereas say a few years ago UE3 was the big thing in the industry leading by quite a margin and UE2.x did pretty well too but UE3 really took off.)
No idea what the next Anvil Next engine game will be, for Ubisoft then next up I think that's Far Cry 5 running on the new Dunia engine using features such as photogrammetry for environmental detail and whatever else they've added or updated.
(While also making use of some AMD features it might end up using some NVidia tech again, kinda curious that it wasn't used for AC Origins actually.)
But I suppose that's getting a bit off topic.

Please Log in or Create an account to join the conversation.
- OtisInf
-
I've refactored the code for depthbuffer detection/tracking as a lot doesn't do much as it's a left over it seems from v1 or earlier, but ran into a problem with where things are stored, so I hope to have fixed that by tomorrow so I can see if this truly solves things properly. I don't see why not, but it will be a bit of work to make it fit into the code base.
If that works I'll post a pull request on github so it can be merged (after crosire likely tells me to rewrite a couple of things because it's not good C++

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

Very odd it has a height of the window with 1 pixel height difference with some of the depth buffers the game uses. In full screen it works OK of course, as the depth buffer then matches the window height reshade works with. Almost there

(edit) AC:O seems to use an even number for depth stencil height, so if the client area in the window has a height that's even (check with SRWE), the depth buffer has that too and everything works great. If the client area has a height that's uneven, the depth buffer height is still even and thus it doesn't match. Easy fix, with a heuristic check.
Please Log in or Create an account to join the conversation.
- Martigen
-
Thank you for your work on this, amazing!OtisInf wrote: Fixed everything, it's superfast now, with 1 issue: it has 3 depth stencils, where 2 are 1 pixel too high for the window height and 1 matches the window height. The one it should pick is 1 pixel too high so it picks the wrong one... as there's just 1 to choose from which matches the window
Very odd it has a height of the window with 1 pixel height difference with some of the depth buffers the game uses. In full screen it works OK of course, as the depth buffer then matches the window height reshade works with. Almost there
(edit) AC:O seems to use an even number for depth stencil height, so if the client area in the window has a height that's even (check with SRWE), the depth buffer has that too and everything works great. If the client area has a height that's uneven, the depth buffer height is still even and thus it doesn't match. Easy fix, with a heuristic check.
I wonder how many other games will benefit from this too

Please Log in or Create an account to join the conversation.
- OtisInf
-
Martigen wrote:
Thank you for your work on this, amazing!OtisInf wrote: Fixed everything, it's superfast now, with 1 issue: it has 3 depth stencils, where 2 are 1 pixel too high for the window height and 1 matches the window height. The one it should pick is 1 pixel too high so it picks the wrong one... as there's just 1 to choose from which matches the window
Very odd it has a height of the window with 1 pixel height difference with some of the depth buffers the game uses. In full screen it works OK of course, as the depth buffer then matches the window height reshade works with. Almost there
(edit) AC:O seems to use an even number for depth stencil height, so if the client area in the window has a height that's even (check with SRWE), the depth buffer has that too and everything works great. If the client area has a height that's uneven, the depth buffer height is still even and thus it doesn't match. Easy fix, with a heuristic check.
I wonder how many other games will benefit from this too

Everything works now. I also added support for resolution scaling, so in e.g. AC:O if you use resolution scaling of say 140% it still works (also e.g. when you set it to a lower value, e.g. 70%). It seems a bit faster than the current code as well so that's a bonus, overall.
I'll do some cleanup, reviewing and fix a minor issue in 3.1 where the # of drawcalls is always 0 in 'statistics', but that's minor, then a PR and let's hope there aren't any problems crosire can think of so it can be merged

Please Log in or Create an account to join the conversation.
- OtisInf
-
Please Log in or Create an account to join the conversation.
- Martigen
-
Thankyou for doing this Otis! I just started AC:O myselfOtisInf wrote: All done. PR: github.com/crosire/reshade/pull/38

Uh, do you have binaries you can share?

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