The basis for this experiment is to render two separate scenes that have a common door. I used a piece of 3D geometry (a rectangular door) to render into the stencil buffer then performed a collision test on the same geometry to determine which scene we are considered to be "inside" of. The scene that we are inside of is rendered where the stencil buffer is zero and the other scene where it is not zero. Don't forget to line up the geometry in each scene so that their doors line up with the door in world space!
Downloads and Source Code
Feel free to download the project and use it any way you wish. Email me at alec@fullsail.edu if you have any questions.
Download Executable (19MB)
Download Source (19MB)
Video Demo
Coming soon...