Sets front and back stencil test actions.
SyntaxWebGLRenderingContext.stencilOp(fail, zfail, zpass);
- fail [in]
Specifies the action to take when the stencil test fails.
- zfail [in]
Specifies the stencil action when the stencil test passes, but the depth test fails. This parameter is ignored when the depth buffer or depth test are disabled.
- zpass [in]
Specifies the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth testing is not enabled.
This method does not return a value.
The parameters set via stencilOp are set on both the front and back-facing stencil buffers.
The parameters set via stencilOp default to KEEP for both the front and back-facing stencil buffers.
The stencilOp parameters can be set when the stencil test is disabled or a stencil buffer is unavailable.