# DepthFunction

engine/Source/Scene/DepthFunction.js 8
Determines the function used to compare two depths for the depth test.

##### Properties:

Name | Type | Description
--- | --- | ---
`NEVER` | number | The depth test never passes.
`LESS` | number | The depth test passes if the incoming depth is less than the stored depth.
`EQUAL` | number | The depth test passes if the incoming depth is equal to the stored depth.
`LESS_OR_EQUAL` | number | The depth test passes if the incoming depth is less than or equal to the stored depth.
`GREATER` | number | The depth test passes if the incoming depth is greater than the stored depth.
`NOT_EQUAL` | number | The depth test passes if the incoming depth is not equal to the stored depth.
`GREATER_OR_EQUAL` | number | The depth test passes if the incoming depth is greater than or equal to the stored depth.
`ALWAYS` | number | The depth test always passes.

### Members

#### static constant Cesium.DepthFunction.ALWAYS : number
engine/Source/Scene/DepthFunction.js 71

The depth test always passes.

Default Value: `WebGLConstants.ALWAYS`

#### static constant Cesium.DepthFunction.EQUAL : number
engine/Source/Scene/DepthFunction.js 31

The depth test passes if the incoming depth is equal to the stored depth.

Default Value: `WebGLConstants.EQUAL`

#### static constant Cesium.DepthFunction.GREATER : number
engine/Source/Scene/DepthFunction.js 47

The depth test passes if the incoming depth is greater than the stored depth.

Default Value: `WebGLConstants.GREATER`

#### static constant Cesium.DepthFunction.GREATER_OR_EQUAL : number
engine/Source/Scene/DepthFunction.js 63

The depth test passes if the incoming depth is greater than or equal to the stored depth.

Default Value: `WebGLConstants.GEQUAL`

#### static constant Cesium.DepthFunction.LESS : number
engine/Source/Scene/DepthFunction.js 23

The depth test passes if the incoming depth is less than the stored depth.

Default Value: `WebGLConstants.LESS`

#### static constant Cesium.DepthFunction.LESS_OR_EQUAL : number
engine/Source/Scene/DepthFunction.js 39

The depth test passes if the incoming depth is less than or equal to the stored depth.

Default Value: `WebGLConstants.LEQUAL`

#### static constant Cesium.DepthFunction.NEVER : number
engine/Source/Scene/DepthFunction.js 15

The depth test never passes.

Default Value: `WebGLConstants.NEVER`

#### static constant Cesium.DepthFunction.NOT_EQUAL : number
engine/Source/Scene/DepthFunction.js 55

The depth test passes if the incoming depth is not equal to the stored depth.

Default Value: `WebGLConstants.NOTEQUAL`

Need help? The fastest way to get answers is from the community and team on the Cesium Forum.