Garry's Mod Wiki


  render.SetStencilReferenceValue( number referenceValue )


Sets the Stencil system's Reference Value which is compared against each pixel's corresponding Stencil Buffer value in the Compare Function and can be used to modify the Stencil Buffer value of those same pixels in the Pass, Fail, and Z Fail operations.

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


1 number referenceValue
The value that the Compare function and the pass, fail, and z-fail operations will use.
This is an 8-bit (byte) unsigned integer value in the range [0-255]