Hey, I’ve been trying to get depth to work in shaders, and have found some examples online as well as looking at unity’s sample code, but can’t get any of it to work.
The code here
Unity - Manual: Cameras and depth textures,
returns all black.
Also, when trying to this intersection shader as shown in this demo:
nothing happens
I’ve made sure my camera has DepthTextureMode set to depth, made sure my graphics card supports depth renderTextureFormat, and tried a number of different things like :
using different depth functions,
changing camera rendering modes,
using different parameters for extracting _CameraDepthTexture.
Is this feature Unity-Pro only? Or is there something I’m missing entirely? I’d love to get something working for depth so I can at least have a starting point.
Thanks!