- Home /
Problem is not reproducible or outdated
Can't get depth shaders to work.
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 https://docs.unity3d.com/Manual/SL-DepthTextures.html, returns all black.
Also, when trying to this intersection shader as shown in this demo: https://www.youtube.com/watch?v=vwo3AHzagvg&t=40s 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!
Answer by Xepherys · Sep 16, 2017 at 01:50 AM
With Unity 2017, I don't believe any core features are pro-only anymore. I could be wrong, but I believe this was one of the major licensing changes either this version or in a later version of 5.