Pass:setStencilTest

Sets the stencil test. Any pixels that fail the stencil test won't be drawn. For example, setting the stencil test to ('equal', 1) will only draw pixels that have a stencil value of 1. The stencil buffer can be modified by drawing while stencil writes are enabled with lovr.graphics.setStencilWrite.


Pass:setStencilTest(test, value, mask)

Arguments

NameTypeDefaultDescription
testCompareMode The new stencil test to use.
valuenumber The stencil value to compare against.
masknumber0xff An optional mask to apply to stencil values before the comparison.

Returns

Nothing


Disable the stencil test.

Pass:setStencilTest()

Arguments

None

Returns

Nothing

Notes

The stencil test is disabled by default.

See also