Thanks a lot!
You can do this using the DepthFade node but it will only work on translucent materials so may not be useful for you.
If it works for you i can give more info but the short version is using the inverted output of the depthfade to power the color/alpha where the two meet.