Shader opacity based on z

I need more information on shaders, I need to buy a book on shaders or something before I can work this out…

I’ve posted it as a job on this forum: