Back to Filament

setStencilWriteMask

docs/android/dokka/filament-android/com.google.android.filament/-material-instance/set-stencil-write-mask.md

1.75.01.2 KB
Original Source

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

setStencilWriteMask

[main]
open fun setStencilWriteMask(writeMask: Int, face: MaterialInstance.StencilFace)

Sets the stencil write mask (default is 0xFF).

The stencil write mask masks the bits in the stencil buffer updated by stencil operations.

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

Parameters

main

writeMaskthe write mask (only the least significant 8 bits are used)
facethe faces to update the read mask for

[main]
open fun setStencilWriteMask(writeMask: Int)

Sets the stencil write mask for both front and back-facing polygons.

See also

setStencilWriteMask(int, StencilFace)