White Noise in Blender Z Pass with alpha value in Mix Shader I am trying to get the depth value using z pass from my scene which is a simple head model, but while rendering there is white salt and pepper noise in the hair and eyelash. I have saved in both png after normalizing and in openexr file with the raw data.
While looking into it I figure it out that both the object are using alpha value from the diffuse and opacity texture file. Below are the composite pass I am using - 

 

Following is the node editor for hair/eyelash object - 



Following are the image and corresponding depth (z pass output) as png in with the original alpha values - 



Then I manually edited the alpha channel value in the texture image of the hair: 
I edited the alpha as 255 where there is a alpha value present ( > 0)



This reduced the noise a lot but at the same time its reduce the rendering quality of the hair mesh as well - 



I have also tested with changing the max bounces for transparency and transmission but it did not change the result

Is there any further solution of this issue...

Blend File Link : 

https://drive.google.com/open?id=1LzJ-RiZzgxlY1aGHTTAAaS0OrGTseyvc
Switch to Branched Path Tracing

Switch the sampling method to Branched Path Tracing and set Min Transparent Bounces to 32 or higher to eliminate the noise.



Also, it is better to use Mist pass instead of Depth.



You need to map the value from 0-1 to 0-100, depending on your mist settings, to match the depth pass.



Thanks to skw Stefan Werner for the Branched Path Tracing hint. https://blenderartists.org/t/cycles-depth-and-mist-passes-for-a-transparent-material-give-a-lot-of-noise/1192751/5



Stay with Path Tracing

If you need to stay with Path Tracing, which seemingly ignores Min Transparent Bounces, you can create a new view layer with material override.





The material will be with Camera Data node and mixing by the object index N.



Change the object indexes of all the particle objects to N, easily with Copy to Selected.



It gives the same result as the mist pass.