Transparent BSDF cause noise in depth layer I have system that consumes depth and RGB output of Cycles renderer.
I can observe noise in depth maps when I use transparent BSDF with Mix shader and RGBA texture. Let's look at sample simple shader:


That shader is giving material that is transparent with level of transparency given by alpha channel of texture.
I am not happy with depth image, especially on edges (white dots):


Two factor has to be present to "depth" noise appears:


There must be some other object behind the part that is transparent.
The noise seems to be absent when alpha channel has only value 255 or 0.


A this moment I found some solutions:


using mist pass
using material override


First solution seems to give depth values in some bizzare scale (I need it linear in meters, like Z-pass) and the noise is still present.
Second solution is not acceptable, because removes desired feature.
I think that it is normal behavior, same issue appears in mist pass.
During mist pass / z-pass mixa shaders with transparent shader cause that some of rays do not contribute to image output. I resolved it introducing contrast node before mix shader to keep mixing rate 0 or 1.