Threejs Portals

Hello everyone, I’m new to this forum. Here is my implementation of portals using stencil buffers.
https://gleb-sokolkov.github.io/public/

2 Likes

Nice.

Stencil buffers are evil.

Where does this shadow come from? (part of it is moving together with the portal; gamma is changed to make the shadow more visible)

I made this visual effect of portals just for interest. Stencil buffer was convenient to cut out unnecessary parts of the screen.
About the weird shadows, I just took them from the threejs example and didn’t go into details.

1 Like