Skip to main content

StencilState

depth stencil state

TypeNameInterface Description
VariablescompareFunction: StencilFunction

• Function: The comparison function used for the stencil test.

Returns The stencil function used for the stencil test.

Variablesenable: boolean

• Function: Indicates whether stencil testing is enabled.

Returns True if stencil testing is enabled, false otherwise.

VariablesfailOperation: StencilOperation

• Function: Get the operation to perform when the stencil test fails.

Returns The stencil operation to perform when the stencil test fails.

VariablespassOperation: StencilOperation

• Function: Get the operation to perform when the stencil test passes.

Returns The stencil operation to perform when the stencil test passes.

VariablesreadMask: number

• Function: The mask applied to the stencil buffer for reading operations.

Returns The mask applied to the stencil buffer for reading operations.

VariablesreferenceValue: number

• Function: The reference value for the stencil state.

Returns The reference value used for stencil testing.

VariableswriteMask: number

• Function: The write mask for the stencil state, which determines which bits can be written to the stencil buffer.

Returns The mask applied to the stencil buffer for writing operations.

Functionsconstructor()

Examples​

constructor()​

let obj = new APJS.StencilState();

Use Case​

@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use StencilState here
}
onUpdate(deltaTime: number) {
}
}
Copyright © 2026 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalTerms of ServicePrivacy PolicyCookies