How many clips one frame can carry: eight, because every stencil buffer
WebGL 2 can allocate is 8 bits deep (STENCIL_INDEX8 and
DEPTH24_STENCIL8, R-7) and this design spends one bit plane per clip.
A plane per clip rather than a counter per nesting depth is the only
assignment that is correct for siblings: two clips at the same depth writing
the same plane would each pass the other's test, so a scroll view would show
its neighbour's content. The price is that the limit counts clips in the
frame, not nesting levels — which is the number §67 asks for a diagnostic
about, and ClipPlaneAllocator emits it.
How many clips one frame can carry: eight, because every stencil buffer WebGL 2 can allocate is 8 bits deep (
STENCIL_INDEX8andDEPTH24_STENCIL8, R-7) and this design spends one bit plane per clip.A plane per clip rather than a counter per nesting depth is the only assignment that is correct for siblings: two clips at the same depth writing the same plane would each pass the other's test, so a scroll view would show its neighbour's content. The price is that the limit counts clips in the frame, not nesting levels — which is the number §67 asks for a diagnostic about, and ClipPlaneAllocator emits it.