Back to Filament

setStencilOpStencilFail

docs/android/dokka/filament-android/com.google.android.filament/-material-instance/set-stencil-op-stencil-fail.md

1.75.01.3 KB
Original Source

//filament-android/com.google.android.filament/MaterialInstance/setStencilOpStencilFail

setStencilOpStencilFail

[main]
open fun setStencilOpStencilFail(op: MaterialInstance.StencilOperation, face: MaterialInstance.StencilFace)

Sets the stencil fail operation (default is KEEP).

The stencil fail operation is performed to update values in the stencil buffer when the stencil test fails.

It's possible to set separate stencil fail operations; one for front-facing polygons, and one for back-facing polygons. The face parameter determines the stencil fail operation(s) updated by this call.

Parameters

main

opthe stencil fail operation
facethe faces to update the stencil fail operation for

[main]
open fun setStencilOpStencilFail(op: MaterialInstance.StencilOperation)

Sets the stencil fail operation for both front and back-facing polygons.

See also

setStencilOpStencilFail(StencilOperation, StencilFace)