Documentation
    Preparing search index...

    Type Alias StencilOp

    StencilOp:
        | "keep"
        | "zero"
        | "replace"
        | "increment"
        | "increment-wrap"
        | "decrement"
        | "decrement-wrap"
        | "invert"

    What happens to the stored stencil value at one of the three outcomes of a fragment (§67).

    "increment" and "decrement" saturate at 0 and 255; the -wrap forms wrap modulo 256. Saturating is the right default for nested clipping — a depth counter that wrapped past 255 would silently re-enter the region it was supposed to have left — and the wrapping forms are named because a bit-plane-parity mask wants them.