Skip to main content

Pass

TypeNameInterface Description
VariablesdepthTest: boolean

Depth Test Switch

Example

mainPass.depthTest = false;
TypeNameInterface Description
VariablesdepthWrite: boolean

Depth Write Switch

Example

mainPass.depthWrite = false;
TypeNameInterface Description
VariablesdepthFunction: DepthFunction

Depth Test Function

Example

mainPass.depthFunction = APJS.DepthFunction.Greater;
TypeNameInterface Description
VariablescolorMask: ColorMask

Color Mask

Example

let mask = 0;
mask |= APJS.ColorMask.R;
mask |= APJS.ColorMask.G;
mask |= APJS.ColorMask.B;
mask |= APJS.ColorMask.A;
mainPass.colorMask = mask;
TypeNameInterface Description
VariablescullMode: CullMode

Face Culling Mode

Example

mainPass.cullMode = APJS.CullMode.Back;
TypeNameInterface Description
VariablesstencilState: StencilState

Template Test

Example

mainPass.stencilState.enable = true;
mainPass.stencilState.failOperation = APJS.StencilOperation.Keep; mainPass.stencilState.passOperation = APJS.StencilOperation.Replace;
mainPass.stencilState.compareFunction = APJS.StencilFunction.Always;
mainPass.stencilState.writeMask = 42;
mainPass.stencilState.referenceValue = 42;
Copyright © 2025 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalCookies