Welcome, Guest.
Username: Password: Remember me

TOPIC: About DepthBuffer

About DepthBuffer 1 year 5 months ago #1

:blush:
Hi there, and first thanks a lot for this impressive tools!

I or We like to record some videogame footage and most of our postprocessing is done in AE. But what we really could use ist the DepthBuffer Output.
Therefore my stupid question, is it anyway possible to record both, The Gameoutput (with effects) and second the Depthbuffer alone? I only need a very low res version of the DepthBuffer for later composition purposes.

Best regards ;)
The administrator has disabled public write access.

About DepthBuffer 1 year 5 months ago #2

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Simplest (w/o writing/changing shader) answer would be using the split screen shader after the depth visualization shader.
If you want to compare both full images set SScomparableStretch to 1.
The administrator has disabled public write access.

About DepthBuffer 1 year 5 months ago #3

Maybe i have expressed myself wrong
I need the record of both at the same time. The beauty pass ( game out + sweetfx / reshade ) and the depth buffer in two spearate files.
I have not the possibility to record two times. (No ingame campath or replay tools)
The administrator has disabled public write access.

About DepthBuffer 1 year 5 months ago #4

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2652
  • Thank you received: 1521
Only way that comes to mind is to resize the game window to its double width, make sure the game renders in its original resolution and then stretch the image and output the depth buffer content to the right and then record the whole thing. The video then can be splitted in a follow-up process.
+--------+           +----------------+           +----------------+
|  GAME  |    -->    |   G  A  M  E   |    -->    |  GAME  | DEPTH |
+--------+           +----------------+           +----------------+
Cheers, crosire =)
Last Edit: 1 year 5 months ago by crosire.
The administrator has disabled public write access.

About DepthBuffer 1 year 4 months ago #5

Thx for your answer.

To make it clear: I like to record in 1920x1080. So i start the game in this resolution in windowed mode
Then i resize the window to 1920x2160!

Now i use something like splitscreen (master effects) and compress the image back to 1920x1080 and out put the whole image depthbuffer on the freed room.
I'm new to reshade, is this possible and could you put me in the right direction how the shader setup should look like to compress the image back to output resolution and display the DepthBuffer next to it. (The standard splitscreen shader cuts the image in the middle)
The administrator has disabled public write access.

About DepthBuffer 1 year 4 months ago #6

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2652
  • Thank you received: 1521
3840x1080, and a shader like this (resizes the image to the original 1920x1080 and places the depth buffer to its right, so the final image is 3840x1080 with one half the game output and one half the scene depth info):
float4 PS_SplitDepthView(float4 vpos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target
{
	float3 col = texcoord.x <= 0.5 ? tex2D(ReShade::BackBuffer, texcoord * float2(0.5, 1.0)).rgb : tex2D(ReShade::LinearizedDepthBuffer, texcoord * float2(0.5, 1.0) + float2(0.5, 0.0)).rrr;
	return float4(col, 1.0);
}

technique SplitDepthView < enabled = true; >
{
	pass
	{
		VertexShader = ReShade::VS_PostProcess;
		PixelShader = PS_SplitDepthView;
	}
}
Cheers, crosire =)
The administrator has disabled public write access.

About DepthBuffer 1 year 4 months ago #7

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Or -as I wrote before- you could have simply used the splitscreen shader of the framework on top of the depth visualization without the need to change any shader code ;)
The administrator has disabled public write access.

About DepthBuffer 1 year 4 months ago #8

crosire: thanks alot i 'll try this approach later.

Ganossa: thank you, too. I will try your solution too to see what's the best way ;) Could you short explain how i would setup your solution?
The administrator has disabled public write access.

About DepthBuffer 1 year 4 months ago #9

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
If you used the ReShade Framework before it would be simple.

Download and install it. Add your target game/application and a preset for it with the mediator tool.

Activate/check the depth visualization and splitscreen shader in the effect pipeline tab (both should be two of the last shader in the pipeline)

Make sure splitscreen is ordered after depth visualization, otherwise use the mouse wheel to change the order.

Press the apply button to confirm the changes. ;)

The splitscreen shader should be set to comparable by default which means it renders two complete pictures next to each other (devided by the y axis by default). If you now stretch you game/application window as suggested by crosire, you get one screen the original and the other screen the depth visualization.

Note, there is a border drawn between both sides of the splitscreen. You can decrease its size in the splitscreen settings (which you can jump to by clicking on the shader in the pipeline tab)

@0:37 you can see the one I am talking about :)
Last Edit: 1 year 4 months ago by Ganossa.
The administrator has disabled public write access.

About DepthBuffer 1 year 4 months ago #10

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2652
  • Thank you received: 1521
Ganossa wrote:
The splitscreen shader should be set to comparable by default which means it renders two complete pictures next to each other (devided by the y axis by default). If you now stretch you game/application window as suggested by crosire, you get one screen the original and the other screen the depth visualization.
Right, I forgot about that. Should be the easiest way to achieve what you want then.
Cheers, crosire =)
The administrator has disabled public write access.