Pass:setStencilWrite
EditSets or disables stencil writes. When stencil writes are enabled, any pixels drawn will update the values in the stencil buffer using the StencilAction
set.
Arguments
Name | Type | Default | Description |
action | StencilAction | How pixels drawn will update the stencil buffer. | |
value | number | 1 | When using the 'replace' action, this is the value to replace with. |
mask | number | 0xff | An optional mask to apply to stencil values before writing. |
Returns
Nothing
Arguments
Name | Type | Default | Description |
actions | table | A list of 3 stencil actions, used when a pixel fails the stencil test, fails the depth test, or passes the stencil test, respectively. | |
value | number | 1 | When using the 'replace' action, this is the value to replace with. |
mask | number | 0xff | An optional mask to apply to stencil values before writing. |
Returns
Nothing
Disables stencil writing.
Arguments
None
Returns
Nothing
Notes
By default, stencil writes are disabled.
Setting the stencil test requires the Pass
to have a depth texture with the d24s8
or d32fs8
format (the s
means "stencil"). The t.graphics.stencil
and t.headset.stencil
flags in lovr.conf
can be used to request a stencil format for the default window and headset passes, respectively.