Rendering glass panes

Anyways, since playing outlast I’ve gotten interested in learning how certain 3D affects are pulled off.
One that still baffles me is the glass-within-scene effect as seen here

prepend a www dot and copy and paste this link since the forum won’t let me post it…

I understand how to pull of refraction when the environment map is static, but how do they render the FBO/lookup texture from that plate of glass such that it looks perfectly transparent if the refraction factor was zero (as if the glass pane wasn’t there, but still using the lookup texture)

Are there any easy to follow papers that explain this? Most of the tutorials and sdk examples always cheat and use stupid statically rendered cube maps like a cathedral image which really aren’t that useful for actual scene renderings.

Man this forum is atrociously not mobile friendly

Heres another example.

how the heck do they render the lookup texture for the water?

If you are just interested in techniques is a good site. Most of it is DirectX but anything you can do in DirectX you can do in OpenGL

I appreciate the link, but Im interested in the SPECIFIC technique that I asked about above. I’ve landed here after spending a few hours trying to search the internet and many sites already without finding anything.

I found this, I think it’s what I’ve been looking for

Interesting link