Skip to main content

DepthFunction

Defines the depth comparison function used for depth testing.

TypeNameInterface Description
EnumAlways

Function: Depth test always passes.

EnumEqual

Function: Depth test passes if the incoming depth value is equal to the stored depth value.

EnumGreater

Function: Depth test passes if the incoming depth value is greater than the stored depth value.

EnumGreaterOrEqual

Function: Depth test passes if the incoming depth value is greater than or equal to the stored depth value.

EnumLess

Function: Depth test passes if the incoming depth value is less than the stored depth value.

EnumLessOrEqual

Function: Depth test passes if the incoming depth value is less than or equal to the stored depth value.

EnumNever

Function: Depth test never passes.

EnumNotEqual

Function: Depth test passes if the incoming depth value is not equal to the stored depth value.

Examples

Always

let value = APJS.DepthFunction.Always;

Equal

let value = APJS.DepthFunction.Equal;

Greater

let value = APJS.DepthFunction.Greater;

GreaterOrEqual

let value = APJS.DepthFunction.GreaterOrEqual;

Less

let value = APJS.DepthFunction.Less;

LessOrEqual

let value = APJS.DepthFunction.LessOrEqual;

Never

let value = APJS.DepthFunction.Never;

NotEqual

let value = APJS.DepthFunction.NotEqual;

Use Case

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