Luna::RHI::StencilOp

enum StencilOp : u8
{
    keep
    zero
    replace
    increment_saturated
    decrement_saturated
    invert
    increment
    decrement
}

Specifies the stencil operation to perform when stencil test passed or failed.

Options

  • keep

    Keeps the original stencil data.

  • zero

    Clears the stencil data to 0.

  • replace

    Replaces the stencil data with the data set by ICommandBuffer::set_stencil_ref.

  • increment_saturated

    Increases the stencil data by one, and clamps the result so that it will not overflow and goes to 0.

  • decrement_saturated

    Decreases the stencil data by one, and clamps the result so that it will not underflow and goes to the maximum representable value.

  • invert

    Inverts the stencil data. This will invert every bit of the stencil data.

  • increment

    Increases the stencil data by one. If the data overflows, it will be reset to 0.

  • decrement

    Decreases the stencil data by one. If the data underflows, it will be reset to the maximum representable value.