I decided to give cubemap refraction a shot as well after finishing up reflection and I ran into some unexpected challenges. The standard implementation form Nvidia and everywhere else on the internet seemed to yield a refraction that looked quite out of place. In order to fix it, I had to invert the x component of the refraction vector prior to sampling the cubemap. Here is a before and after shot at full opacity so you can see what i mean:
As far as i can tell the X flip is needed because of how Unity’s skybox system works. When I implemented my own skybox with a cubemap it lined up fine. For some reason either the cubemap is coming in backwards in one direction. I wasn’t happy with the results of the skybox replacement though (far too low res) so this will have to do until i figure out how to do a proper sky replacement shader.
In any case, check this out – It has normal mapped reflection AND refraction and runs on SM 2.0!
One unfortunate thing to note is the best i can do for depth sorting in Maya is set it to Always. This makes it look essentially the same, but Unity uses the render queue to allow transparent objects to still be overwritten. I can’t seem to do this in Maya, so the glass will appear in front of things it should be behind. If i find a better solution i’ll post it.