Garry's Mod Wiki

render.SetStencilCompareFunction

  render.SetStencilCompareFunction( number compareFunction )

Description

Sets the compare function of the stencil.

Pixels which fail the stencil comparison function are not written to the render target. The operation to be performed on the stencil buffer values for these pixels can be set using render.SetStencilFailOperation.

Pixels which pass the stencil comparison function are written to the render target unless they fail the depth buffer test (where applicable). The operation to perform on the stencil buffer values for these pixels can be set using render.SetStencilPassOperation and render.SetStencilZFailOperation.

Arguments

1 number compareFunction
Compare function, see STENCILCOMPARISONFUNCTION enum, and STENCIL enum for short.