I found an example on unity for the view angles , I am sure someone here can translate the math .

http://answers.unity3d.com/questions/992289/portal-effect-using-render-textures-how-should-i-m.html


Compulsive compiler