Depth Buffer Output

  • Posts: 343
4 years 2 months ago #1 by Elimina
How exactly does ReShade visualize the depth buffer when using the effect? From the looks of it, it looks like an output without textures/sharing and a ground level volumetric fog, but I'm not quite sure how ReShade generates the effect of the fog. I was thinking about the fog effect that has been suggested several time, but many times the concept idea is denied by problems with performance and complications with the current bloom code. I was wondering how ReShade makes the effects of the depth buffer fog, and if there could be a depth effect that gives the game this look but with the textures and shading still intact. I have not thought about how the process to get this will be, so I'm guessing that the effect will probably not work like I am thinking. (That is the reason why it is in the discussion section and not in the suggestion section

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

  • Posts: 3666
4 years 2 months ago #2 by crosire
It's just the linear depth value converted to a grayscale color. Say an object is 20 units away from the camera and the camera far plane is set to 100 units. The depth value would then be 0.2, which would be displayed as RGB(0.2, 0.2, 0.2).

A fog effect is quite simple to achieve by the way. Here's an example: www.facebook.com/MartyMcModding/photos/931018343602786 .
The following user(s) said Thank You: Elimina

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

  • Posts: 343
4 years 2 months ago - 4 years 2 months ago #3 by Elimina

crosire wrote: A fog effect is quite simple to achieve by the way. Here's an example: www.facebook.com/MartyMcModding/photos/931018343602786 .


I didn't realize Marty already made a fog :P I need to check Facebook more often. Im guessing the effect isn't coming to 2.0? Is the fog effect that you have created based purely on distance or does it also take in account the height like the Depth Buffer Output fog?

(Image By Ganossa)

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

  • Posts: 92
4 years 2 months ago - 4 years 2 months ago #4 by piltrafus
Depth buffer doesn't include height info. Only distance to camera.
Maybe you got confused because usually the top half of depth buffer is white. That's were you find the furthest distance to camera in an open sky environment. Also indoors the ceiling is usually further away from camera.

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

  • Posts: 343
4 years 2 months ago #5 by Elimina

piltrafus wrote: Depth buffer doesn't include height info. Only distance to camera.
Maybe you got confused because usually the top half of depth buffer is white. That's were you find the furthest distance to camera in an open sky environment. Also indoors the ceiling is usually further away from camera.


Why does it seem like the top of trees and buildings are darker than the ground below on the last screenshot? The tower in the distance on the left is surrounded by almost white but the tower is grey. It is the same distance from the camera as the surrounding terrain at the base of the tower :/

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

  • Posts: 3666
4 years 2 months ago - 4 years 2 months ago #6 by crosire
The tower is a bit closer due to the perspective, the rest is an optical illusion. As piltrafus said, depth is a scalar value, no height information is available.
The following user(s) said Thank You: Elimina

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