ReadonlydepthStored when the stencil test passes and the depth test fails.
ReadonlyfailStored on stencil-test failure.
ReadonlyfuncThe comparison; see StencilFunc. (ref & readMask) OP (stored & readMask).
ReadonlypassStored when both tests pass.
ReadonlyreadThe bits the test looks at, 0…255.
ReadonlyrefThe reference value, 0…255.
ReadonlywriteThe bits a write may change, 0…255; 0 for a read-only test.
A stencil configuration as a render item carries it — structurally identical to §57's
StencilState, and deliberately not that class.@fourjs/materials'StencilStateis nominal (private fields) precisely so thatmaterial.tscan import it type-only and a bundle that never masks does not carry it (R-7, measured at 0.62 kB gzip). Constructing one here would undo that for every bundle that carries a render list — i.e. all of them — so this module builds plain records instead and the backend, which has always read §57's state structurally, cannot tell the difference. The two string unions are importedimport type, which costs nothing at runtime.Every field is present, so a backend's defensive
?? defaultreads never fire on one of these.