Original Post
I'm trying to setup a refrected material type of effect (a glass effect basically), but having a bit of trouble. I've found plenty of information online about using cubemaps and such, but I am trying to do this all as a post processing effect. My setup is that I render the entire scene, so I have it all stored in a texture. I want to now render my glass objects, using the final image of my scene as the input. For the glassy surfaces, I want to distort them based on their index and surface normal. My problem is that I have a 2D coordinate for the scene image, and a world space normal for the surface. How do I convert that normal into an offset for my 2D coordinate, based on my index value?