I implemented a HLSL shader in XNA during the past few days and i’m pretty satisfied with the outcome.
The shader takes a few parameters like the usual light position, normal map, cube map and so on, but the most important here is the two refraction indices describing how the light bends, using Snell’s law. There is also one parameter that can be set to true, that will make the light refract differently on each rgb channel.
I will share it with you on my XNA Shader Presentation at NITH sometime after the Easter, together with many small post-process shaders I have made recently( Radial Blur, Depth of Field, G.Blur, Sharpen, Emboss, B/W, Invert colors).
The mesh here is just a simple sphere I generated on the fly, but any loaded 3d model file can be used.