Table of Contents

Enum StencilOperation

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

Specifies the operation to perform on the stencil part of the Depth-Stencil Buffer when rasterizing primitives.

[DataContract]
public enum StencilOperation
Extension Methods

Fields

Decrement = 8

Decrements the value of the stencil buffer by one, wrapping around to the maximum value if it goes below zero.

DecrementSaturation = 5

Decrements the value of the stencil buffer by one, saturating at zero (usually 0 for 8-bit buffers).

Increment = 7

Increments the value of the stencil buffer by one, wrapping around to zero if it exceeds the maximum value.

IncrementSaturation = 4

Increments the value of the stencil buffer by one, saturating at the maximum value allowed (usually 255 for 8-bit buffers).

Invert = 6

Inverts all bits in the stencil buffer value, effectively flipping each bit from 0 to 1 and from 1 to 0.

Keep = 1

Keeps the current value of the stencil buffer, without modifying it.

Replace = 3

Sets the value of the stencil buffer to a specified value when the stencil test passes.

Zero = 2

Sets the value of the stencil buffer to zero.

Remarks

This enumeration is part of a Depth-Stencil State object description (see DepthStencilStateDescription).