Pass:setStencilWrite

Sets or disables stencil writes. When stencil writes are enabled, any pixels drawn will update the values in the stencil buffer using the StencilAction set.


Pass:setStencilWrite(action, value, mask)

Arguments

NameTypeDefaultDescription
actionStencilAction How pixels drawn will update the stencil buffer.
valuenumber1 When using the 'replace' action, this is the value to replace with.
masknumber0xff An optional mask to apply to stencil values before writing.

Returns

Nothing


Pass:setStencilWrite(actions, value, mask)

Arguments

NameTypeDefaultDescription
actionstable A list of 3 stencil actions, used when a pixel fails the stencil test, fails the depth test, or passes the stencil test, respectively.
valuenumber1 When using the 'replace' action, this is the value to replace with.
masknumber0xff An optional mask to apply to stencil values before writing.

Returns

Nothing


Disables stencil writing.

Pass:setStencilWrite()

Arguments

None

Returns

Nothing

Notes

By default, stencil writes are disabled.

See also