Documentation
    Preparing search index...

    Type Alias StencilFunc

    StencilFunc:
        | "never"
        | "less"
        | "equal"
        | "lequal"
        | "greater"
        | "notequal"
        | "gequal"
        | "always"

    The comparison a fragment's reference value makes against the stencil buffer (§67), spelled as §57's other vocabularies are — a string union, not an enum, so it serializes, logs, and compares as itself.

    The test is (ref & readMask) OP (stored & readMask), in that order: "less" passes where the reference is less than what is stored.

    value passes when the mask idiom it serves
    "never" never write-only passes, with failOp
    "less" ref < stored nesting depth comparisons
    "equal" ref === stored the mask test — draw only inside the mask
    "lequal" ref <= stored draw inside a mask of at least this depth
    "greater" ref > stored the outside of a nested clip
    "notequal" ref !== stored the inverse mask — draw only outside it
    "gequal" ref >= stored the complement of "less"
    "always" always writing the mask itself (the default)