I tried downloading urp asssets that use it such as water shader but they all return a smooth color.
I also tried making water through an official tutorial but it’s depth effect also doesn’t work.
(
)
I made sure to enable depth texture in the urp asset settings, and downloaded post processing and enabled it on the camera settings but nothing works for me.
What should I do?
I will share any needed details.
[I am using Unity 2021.3.0f1 LTS + Latest Universal version available 12.1.6.]
I had an asset that used to work using a similar technique, but since updating to 2021.3.15f1, all intersection shaders (I’ve tried several tutorials and assets) just don’t work anymore. I’ve toggled Depth Texture. Can anyone help?
I’m also tried the same tutorial in Unity 2023.3/4/5 and 6, but it seems to only work on the Scene View, it doesn’t seem to work on the Game View. An odd behavior I noticed was that the Depth Buffer only seamed to work on the Game View when the Shader Graph windows was docked, undock Shader Graph or close it and the Depth Buffer stops working. Then accidentally clicked the pause button and all at the sudden the Depth Buffer worked even with the Shader Graph window closed, so that gave me an idea: I used to dock Shader Graph in the same cluster as the Scene View, but just for testing I docked it on another cluster, and this time the Depth Buffer did not work, why?.. It seems it only works when the Scene View is either hidden or closed. Maximize the Game View so no other window is visible; Depth Buffer works, restore it to normal size; Depth Buffer doesn’t work. Close the Scene View; Depth Buffer works, open the Scene View, Depth Buffer stop working…
So… watch the tutorial again and notice he never has the Scene View and Game View visible a the same time.
In case anyone stumbles upon this problem now, I’m using Unity 6 and solved the problem by changing the Depth Texture Mode to “After Opaques” in the URP asset settings. It was set to “After Transparents” by default for me.