Well, you can create a float3 attribute that you will set to the camera position.
then in a particle script, do something like that:
float fadeMax = 1.5; // start fading at 1.5 units away from the cam
float fadeMin = 0.5; // fully faded at 0.5 units away from the cam
float alphaFade = saturate(remap(length(ViewPosition - Position), fadeMin, fadeMax, 0, 1));
Color = Color * alphaFade.111x;
Here, the "alphaFade.111x" is a shorter way to write: "float4(1,1,1,alphaFade)"
This will keep the RGB unchanged but multiply the alpha by the fade value, which will be 0.0 below fadeMin distance, and 1.0 above fadeMax distance.
If you name your float3 attribute "ViewPosition", the editor will detect this and auto-fill it with the position of the viewport's camera so that you can properly preview your effect. (see here: http://wiki.popcornfx.com/index.php/Particle_effect_attributes#Special_attributes )
However, in unity, you'll need to explicitely set it to the correct value.
In version v1.10 we added builtin view helpers, such as:
So it will be easier to do that kind of effects, whithout the need to grab the cam's position in unity and manually set the attributes of all your view-dependent effects. They'll just work out of the box.