Garry's Mod Wiki

STENCIL

Description

Enumerations for use with render.SetStencilCompareFunction.

The comparison is between the reference value set by render.SetStencilReferenceValue, and the value of each pixel in the stencil buffer.

These enumerations are mirrors of Enums/STENCILCOMPARISONFUNCTION.

Also see this corresponding MSDN entry: https://msdn.microsoft.com/en-us/library/windows/desktop/ff476101%28v=vs.85%29.aspx.

Values

STENCIL_NEVER1Never passes.
STENCIL_LESS2Passes where the reference value is less than the stencil value.
STENCIL_EQUAL3Passes where the reference value is equal to the stencil value.
STENCIL_LESSEQUAL4Passes where the reference value is less than or equal to the stencil value.
STENCIL_GREATER5Passes where the reference value is greater than the stencil value.
STENCIL_NOTEQUAL6Passes where the reference value is not equal to the stencil value.
STENCIL_GREATEREQUAL7Passes where the reference value is greater than or equal to the stencil value.
STENCIL_ALWAYS8Always passes.

Description

Values

STENCIL_KEEP1Preserves the existing stencil buffer value.
STENCIL_ZERO2Sets the value in the stencil buffer to 0.
STENCIL_REPLACE3Sets the value in the stencil buffer to the reference value, set using render.SetStencilReferenceValue.
STENCIL_INCRSAT4Increments the value in the stencil buffer by 1, clamping the result.
STENCIL_DECRSAT5Decrements the value in the stencil buffer by 1, clamping the result.
STENCIL_INVERT6Inverts the value in the stencil buffer.
STENCIL_INCR7Increments the value in the stencil buffer by 1, wrapping around on overflow.
STENCIL_DECR8Decrements the value in the stencil buffer by 1, wrapping around on overflow.

Page Links


Special Pages


Wikis

?

Render Time: 30ms

DB GetPage 3
Generate Html 4
SaveChanges (1) 9
Render Body 0
Render Sidebar 12