Back to Filament

setStencilOpDepthFail

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

1.75.01.2 KB
Original Source

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

setStencilOpDepthFail

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

Sets the depth fail operation (default is KEEP).

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

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

Parameters

main

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

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

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

See also

setStencilOpDepthFail(StencilOperation, StencilFace)