CS50 · youtube · en-US
1When rendering through a portal, the view angles and screen coordinates must remain consistent between the portal and the destination to ensure correct spatial alignment.
“And so if you think of my player model in terms of walking it to the orange portal. When I'm rendering my exit view, I should end up behind the blue portal as I'm rendering out of it. So it's important to remember that all the angles carry over from that. And most importantly that whether you're rendering textures or rendering to stencil that nothing inside ever moves because it should be the exact same view angles, the pixels should be in the exact same place. If they're not in the same place, your math is wrong.”