DepthFunction
Defines the depth comparison function used for depth testing.
| Type | Name | Interface Description |
|---|---|---|
| Enum | Always | • Function: Depth test always passes. |
| Enum | Equal | • Function: Depth test passes if the incoming depth value is equal to the stored depth value. |
| Enum | Greater | • Function: Depth test passes if the incoming depth value is greater than the stored depth value. |
| Enum | GreaterOrEqual | • Function: Depth test passes if the incoming depth value is greater than or equal to the stored depth value. |
| Enum | Less | • Function: Depth test passes if the incoming depth value is less than the stored depth value. |
| Enum | LessOrEqual | • Function: Depth test passes if the incoming depth value is less than or equal to the stored depth value. |
| Enum | Never | • Function: Depth test never passes. |
| Enum | NotEqual | • 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) {
}
}