THREE.JS / FOUNDATIONS 219

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.

Initializing Preparing WebGL2

Preparing paired targets, clipping policy, and the portal camera...

renderer
-
targets
-
captures
-
depth
-
clip policy
-
projection
-
calls
-
frame ms
-
Portal visibility policylive

Each capture layer renders both portals. The leak beacon sits beyond the destination plane so the clipping policy is visible.

Visibility contractWebGL2 portal pass
material.clippingPlanesobject-local policy
renderer.clippingPlanesglobal capture policy
projectionMatrix[2,6,10,14]oblique near plane
Plane.distanceToPoint()signed-side probe
captureDepth × 2bounded portal work

The 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.

Capture readoutready
portal camera-
plane normal-
camera signed distance-
state restore-
GPU resourcesowned

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.

THREE.JS FOUNDATIONS LAB