Garry's Mod Wiki

Garry's Mod Wiki

  render.SetStencilCompareFunction( STENCILCOMPARISONFUNCTION enum compareFunction )

Description

Sets the Compare Function that all pixels affected by a draw operation will have their Stencil Buffer value tested against.

When not set to a static value like NEVER or ALWAYS, the Stencil Buffer value corresponding to each affected pixel will be compared against the current Reference Value.

Pixels that Pass the Compare Function check move on to the Depth Test, which determines if the draw operation will ultimately be allowed to overwrite the pixel's Color Channel, Stencil Buffer, and Depth Buffer values.

Pixels that Fail the Compare Function check have the Fail Operation performed on their Stencil Buffer value and do not have any of their Render Target layers modified by the draw operation.

For more detailed information on the Stencil system, including usage examples, see the Stencils Render Reference page

Arguments

1 STENCILCOMPARISONFUNCTION enum compareFunction
The Compare Function that each affected pixel's Stencil Buffer value will be evaluated against during a draw operation.
CompareFunctionFlowChart.png

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...