Package let's you easily add fading objects functionality. You can adjust the minimal opacity of the faded object and time of the fade.
You could also take a look at standard transparency approach for fading objects which does not require customizing shaders: