Cut the view at the threshold.
A portal camera can be perfectly framed and still see geometry on the wrong side of the doorway. Compare material clipping, renderer-global clipping, and an oblique near plane while bounded recursion keeps the capture cost visible.
Preparing paired targets, clipping policy, and the portal camera...
- renderer
- -
- targets
- -
- captures
- -
- depth
- -
- clip policy
- -
- projection
- -
- calls
- -
- frame ms
- -
Each capture layer renders both portals. The leak beacon sits beyond the destination plane so the clipping policy is visible.
material.clippingPlanesobject-local policyrenderer.clippingPlanesglobal capture policyprojectionMatrix[2,6,10,14]oblique near planePlane.distanceToPoint()signed-side probecaptureDepth × 2bounded portal workThe portal texture is still a render target. This lab adds the missing visibility decision: only the intended side of the destination surface should reach that target.
The threshold plane is shown only in the main view; capture temporarily hides it and restores renderer state afterward.
Derived from the official portal example, clipping example, Reflector oblique clip, and the current Material / WebGLRenderer docs.