STENCIL Enumerations

From Garry's Mod
Jump to: navigation, search

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.

Clientside only.

These enumerations are mirrors of STENCILCOMPARISONFUNCTION_ Enums.

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

Warning! Decimal values are for reference only! The actual value may be different between two Garry's Mod versions.
Name Decimal Description
STENCIL_NEVER 1 Never passes.
STENCIL_LESS 2 Passes where the reference value is less than the stencil value.
STENCIL_EQUAL 3 Passes where the reference value is equal to the stencil value.
STENCIL_LESSEQUAL 4 Passes where the reference value is less than or equal to the stencil value.
STENCIL_GREATER 5 Passes where the reference value is greater than the stencil value.
STENCIL_NOTEQUAL 6 Passes where the reference value is not equal to the stencil value.
STENCIL_GREATEREQUAL 7 Passes where the reference value is greater than or equal to the stencil value.
STENCIL_ALWAYS 8 Always passes.

Enumerations for use with render.SetStencilPassOperation, render.SetStencilFailOperation and render.SetStencilZFailOperation. Clientside only.

These enumerations are mirrors of STENCILOPERATION_ Enums.

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

Warning! Decimal values are for reference only! The actual value may be different between two Garry's Mod versions.
Name Decimal Description
STENCIL_KEEP 1 Preserves the existing stencil buffer value.
STENCIL_ZERO 2 Sets the value in the stencil buffer to 0.
STENCIL_REPLACE 3 Sets the value in the stencil buffer to the reference value, set using render.SetStencilReferenceValue.
STENCIL_INCRSAT 4 Increments the value in the stencil buffer by 1, clamping the result.
STENCIL_DECRSAT 5 Decrements the value in the stencil buffer by 1, clamping the result.
STENCIL_INVERT 6 Inverts the value in the stencil buffer.
STENCIL_INCR 7 Increments the value in the stencil buffer by 1, wrapping around on overflow.
STENCIL_DECR 8 Decrements the value in the stencil buffer by 1, wrapping around on overflow.
Personal tools
Navigation