Depth hidden in Unity 2021?

I am following this tutorial, and at the timestamped linked: (t=81 or 1:22)

https://www.youtube.com/watch?v=gRq-IdShxpU

They change the depth of the texture.

I Can't find that option, even after enabling it on my shader settings asset.
8333028--1095171--upload_2022-8-3_6-57-51.png
(Depth Texture and Opaque Texture are checked)

What should I do to activate it?
I am using Unity 2021.3.0f1.

That Depth property is a shader property that's added to the shader graph at 2:16. It's not a global setting, it's a material property for that specific shader.

Thanks,
[quote=“alexpana”, post:2, topic: 889961]
That Depth property is a shader property that’s added to the shader graph at 2:16. It’s not a global setting, it’s a material property for that specific shader.
[/quote]

I added it and changing it’s values doesn’t do anything…
I connected the system there to the base color of a lit shader graph.

also on the same tutorial, my Strength value only makes a difference between 0 and 0.0001.
Something seems to be wrong, do you know what it could be?8334678--1095498--1.png 8334678--1095501--2.png

Can you check if your shader's surface is transparent and the material render queue is 3000? Depth information is only available for objects already rendered, and transparent objects are always rendered after opaque ones, making sure the water is rendered after the terrain.

[quote=“alexpana”, post:4, topic: 889961]
Can you check if your shader’s surface is transparent and the material render queue is 3000? Depth information is only available for objects already rendered, and transparent objects are always rendered after opaque ones, making sure the water is rendered after the terrain.
[/quote]

Surface type is set to transparent,
Material render queue is [from shader] 3000.
8338905--1096398--Screenshot 2022-08-05 105942.png

depth still doesn’t seem to do anything.

I also tried downloading an online water shader from the asset store, and it works fine except from the depth of the texture. I also tried using post processing effects but it didn’t change anything.

what should I do?

Let's see if unity renders the depth texture:

  1. Start the game in Game view
  2. Open the Window -> Analysis -> Frame Debugger tool
  3. Click "Enable" in the Frame Debug window
  4. Find your camera, and check two things: 4.1 The "DrawTransparentObjects" scope contains at least a draw call with your water shader that receives the shader property "_CameraDepthTexture"

8341464--1097016--upload_2022-8-6_9-19-49.png

4.2 There is a "CopyDepth" pass for your camera which renders the camera depth attachment to the previously inspected "_CameraDepthTexture"
8341464--1097019--upload_2022-8-6_9-21-19.jpg
If the screen is pitch black when you select "CopyDepth", try reducing the upper limit of the "Levels" range slider in the upper right toolbar of the details panel in Frame Debug.

This should tell you if you have a proper depth texture available to your shader.

8341692--1097067--upload_2022-8-6_13-15-37.png
Checked, it is black and Playing with the Levels Slider doesn't change anything.
does this mean that depth isn't working in my Unity engine, or did I use the depth node wrong?

Thanks for helping me by the way!

It looks like your scene is empty or all objects are disabled, you should have a "DrawOpaqueObjects" pass before the "CopyDepth" pass. In your screenshot, the depth buffer is copied immediately after being cleaned, and nothing is rendered before. There are no opaque objects being drawn in your scene at all, meaning nothing contributes to the depth buffer.

8342466--1097283--upload_2022-8-6_22-4-56.jpg
Sorry about that,

I added terrain and a few cubes underwater. here is what I get after selecting CopyDepth. (and reducing the Levels slider)