The depth buffer in a game tells what in the game has “depth”, as in, what is actually 3D, and what is just a plane. It is the basis for effects such as Ambient Occlusion to detect what occludes and what doesn’t, and for Depth of Field to detect what is close to the camera and what isn’t. Without that, those effects don’t know what is close and far, and can’t work. In the next few steps, you will learn how to identify a depth buffer, how to see if it works, common issues which makes the detection not possible, and so on.
Also, make sure you correctly set-up ReShade and followed the previous steps on the other pages! This guide will be made on the basis that you followed all of the instructions there and got ReShade set-up and running correctly.
THIS IS SUPER-IMPORTANT AND SHALL NOT BE IGNORED.
Depth Buffer Basics
If it looks like this, the shader has loaded and is working, but please notice that we’re not yet done, since there are still some details wrong about that. However, if it looks like any of those below, it has no data, and you should go back a few steps and read what you should disable, carefully.
THIS HAS NO DATA,
BUT THE DEPTH IS CORRECT.
THIS HAS NO DATA,
AND THE DEPTH IS REVERSED.
Now, click the “Edit global preprocessor definitions” on the “Home” tab of the ReShade menu and change the ones according to what fits your case:
Used when you can see the normals, but can’t see the depth image itself (The first result image should represent this perfectly), usually starts at 1 so set it to 0 to fix it, it can also be the other way around.
RESHADE _ DEPTH _ INPUT _ IS _ UPSIDE _ DOWN
As the name says, when the image shown by the DisplayDepth shader is upside down, setting it to 1 should fix the issue.
Used when the depth buffer has lots of waves or “stripes”. Very FEW games actually do use this, so you rarely will have to switch or change that.
Depth Buffer Advanced
Those options here will rarely need to be changed, but for old games or emulators, you might have to fiddle around with them. Here is a description of them.
RESHADE_DEPTH_INPUT_X_SCALE | RESHADE_DEPTH_INPUT_Y_SCALE
Changes the depth buffer size (multiplier, so 1 = original size, 2 = double and so on) on the horizontal (X) and vertical (Y) axis.
How far is the “infinite” defined in the depth buffer. Values can either be really low or really high, so you will have to experiment to see which fits best on your case.
Multiplies the far plane for easy visualization of really low or really high far plane values.
Depth buffers shouldn’t be more broken than this, but in case they are, please contact crosire with info so it can be looked at and updated at future versions / revisions of ReShade, or via an addon.