Back to Filament

setStencilOpDepthStencilPass

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

1.75.01.4 KB
Original Source

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

setStencilOpDepthStencilPass

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

Sets the depth-stencil pass operation (default is KEEP).

The depth-stencil pass operation is performed to update values in the stencil buffer when both the stencil test and depth test pass.

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

Parameters

main

opthe depth-stencil pass operation
facethe faces to update the depth-stencil operation for

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

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

See also

setStencilOpDepthStencilPass(StencilOperation, StencilFace)