Try this:
- Create a Camera Position node and an Absolute World Position node
- Create a Distance node and connect the other two nodes as inputs to that
- Divide the output of the Distance by a large-ish number(this number is the distance after which you want the texture to be completely opaque)
- You can use the output of the Divide node as opacity/opacity mask/Lerp alpha
- Clamp the final value between 0 and 1 if anything weird happens