portal-recursive-nesting
Installation
SKILL.md
Recursive Portal Nesting
What this builds
A portal that correctly shows other portals inside itself, to a controlled depth. Two portals facing each other produce the classic infinite corridor; a mirror facing a mirror produces an infinite regress. Both are the same problem: the portal view contains the portal, so rendering it requires rendering itself.
- Bounded recursion with an explicit depth limit and a terminating frame
- Ping-pong render targets so depth N samples depth N+1's output
- Per-level camera transforms composed from the base portal transform
- Per-level oblique near planes, recomputed at every depth
- Automatic depth reduction under frame-time pressure
- A believable terminal frame so the deepest level does not read as a hole