Camera depth fade not working

Thank you for your response. It didn’t work, I think it has to do with the multiple opacity layers that are connected to the material. I have a mask for the fog transparency, then a gradient on the corners to fade out the material and then the distance fade.