Expand Minimize

stencilOp method

Sets front and back stencil test actions.

IE11

 

Syntax

WebGLRenderingContext.stencilOp(fail, zfail, zpass);

Parameters

fail [in]

Type: number

Specifies the action to take when the stencil test fails.

zfail [in]

Type: number

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]

Type: number

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.

Return value

This method does not return a value.

Remarks

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.

See also

WebGLRenderingContext

 

 

Show:
© 2014 Microsoft