Creating a gravity lens effect? I was thinking of doing some scifi models, and it would involve a kind of gravity lens effect, where light is distorted and warped by a powerful gravity field.

I have attempted to create a gravitational lensing effect with a refraction shader, but the results don't look very good.  Refraction BSDF is a surface shader, and as a consequence the edges of the shader effect are plainly visible as shown in the render below, whereas I would want the edges to fade out more.



I've tried a few things to accomplish the desired effect, such as using a mix shader node with either transparency or a refraction shader with an IOR of 1.  I've tried several variations to accomplish the desired effect, but they all either do nothing or just ruin the shader entirely.

I'm using the cycles engine, and any solutions would be appreciated, especially if they don't require render layers or compositing.
I believe that you would want to mix a Refraction shader with a Transparent one, using the Layer Weight's Facing as the factor; This gives you something similar to fresnel, which, however doesn't depend on surface normals, and can be blended.