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 | {StencilAction} | How pixels should update the stencil buffer when they are drawn. Can also be 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.