What §67 clipping asks of one draw — the record a RenderItem carries
in its clip field.
Two kinds of draw carry one:
a mask draw (maskPass: true), which is a clip node's own geometry
punching its bit plane into the stencil buffer. A backend must force colour
writes, depth writes, and the depth test off for it, whatever the
material says: a mask contributes no pixels and must not occlude, be
occluded by, or be depth-rejected against the content it masks;
a clipped draw (maskPass: false), which is any item inside a clip's
subtree. Its stencil is a read-only test (writeMask: 0) and the rest of
its §57 state is its material's, untouched.
The object is pooled per bit plane and per frame, and its identity is
meaningful: two items carrying the same record are under the same set of
clips, which is what lets §65's batcher break a run on !== without
comparing seven fields.
A clipped item's record takes precedence over its material's own stencil
(§57). That is a deliberate, documented collision: a material that names a
stencil is composing a mask by hand — R-7's tier — and a node that also
declares a clip is asking the engine to compose one for it. Letting the
engine's win keeps the clip's containment guarantee true, which is the one
an author cannot restore by hand once it is broken.
What §67 clipping asks of one draw — the record a RenderItem carries in its
clipfield.Two kinds of draw carry one:
maskPass: true), which is a clip node's own geometry punching its bit plane into the stencil buffer. A backend must force colour writes, depth writes, and the depth test off for it, whatever the material says: a mask contributes no pixels and must not occlude, be occluded by, or be depth-rejected against the content it masks;maskPass: false), which is any item inside a clip's subtree. Itsstencilis a read-only test (writeMask: 0) and the rest of its §57 state is its material's, untouched.The object is pooled per bit plane and per frame, and its identity is meaningful: two items carrying the same record are under the same set of clips, which is what lets §65's batcher break a run on
!==without comparing seven fields.A clipped item's record takes precedence over its material's own
stencil(§57). That is a deliberate, documented collision: a material that names a stencil is composing a mask by hand — R-7's tier — and a node that also declares a clip is asking the engine to compose one for it. Letting the engine's win keeps the clip's containment guarantee true, which is the one an author cannot restore by hand once it is broken.