Is your feature request related to a problem? Please describe.
Currently in stencil based materials, there is only the option to specify what happens to the stencil buffer when both the stencil test and depth test pass, however there is no way to specify what happens in the other 2 cases:
Stencil Fail (sfail)
The action to apply when the stencil test fails
Depth Fail (dpfail)
The action to apply when the stencil test passes, but the depth pass fails
Describe the solution you'd like
There should be two additional options for choosing what happens on these fail cases.
Describe alternatives you've considered
There are majorly difficult workarounds which require multiple stencil increments + separate depth tests to determine which combination of failure conditions occurred, but they are all super tedious to implement.
Additional Context
This came up while implementing a special effect which tries to detect when a mesh is within the mask of another mesh, but simultaneously is failing the depth test, allowing for more comprehensive and advanced cutout rendering through objects. In general this is super useful for area exclusion based effects.
Is your feature request related to a problem? Please describe.
Currently in stencil based materials, there is only the option to specify what happens to the stencil buffer when both the stencil test and depth test pass, however there is no way to specify what happens in the other 2 cases:
Describe the solution you'd like
There should be two additional options for choosing what happens on these fail cases.
Describe alternatives you've considered
There are majorly difficult workarounds which require multiple stencil increments + separate depth tests to determine which combination of failure conditions occurred, but they are all super tedious to implement.
Additional Context
This came up while implementing a special effect which tries to detect when a mesh is within the mask of another mesh, but simultaneously is failing the depth test, allowing for more comprehensive and advanced cutout rendering through objects. In general this is super useful for area exclusion based effects.
This is tangential to, but related to: https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/2040.
Requesters
LuxKitty