I'm trying to make sprites that fade out when the camera looks away from them. Example, when the camera is facing directly at a sprite, the sprite's alpha is 100, but when the camera is facing 90* in either direction, the sprite's alpha is 0.

I'm struggling to get this working with regular programming, and I'm very very close, but my math is too weak and I just can't get it right.

As I've pulled out all my hair, I decided to see if a shader could do this and if so, maybe I could talk/bribe someone into making one for me since I can't write shaders myself.