Aliasing after DOF


How can I antialis the Z pass? Because after apply it, this alias goes in the image, too.


To have a antialiased Z pass, you can use the mist pass or make a custom render layer with a Z depth shader override :

But to use a Defocus node like you’re showing, results are usually better with non antialiased Z pass.
Also, don’t use the normalize node, it makes non accurate value if you do animation.

Thanks, Vincent. I just watched the video about this: