DepthTest QML Type | Qt 3D 5.15.18

- Qt 5.15
- Qt 3D
- QML Types
- DepthTest QML Type
- Qt 5.15.18 Reference Documentation

# DepthTest QML Type

The DepthTest type tests the fragment shader's depth value against the depth of a sample being written to. More...

Import Statement: | import Qt3D.Render 2.15
Since: | Qt 5.7
Inherits: | RenderState

- List of all members, including inherited members

## Properties

- depthFunction : enumeration

## Detailed Description

A DepthTest type is used to enable depth testing with a given depth test function. The depth test enables writing fragment color values when the depth test passes, and reject fragments which fail the test. The depth test uses the depth function to test the fragments depth value to the value against z-buffer. If the underlying surface does not have z-buffer, the DepthTest does nothing.

See also AlphaTest and StencilTest.

## Property Documentation

depthFunction : enumeration

Holds the current function used by depth test. The default is DepthTest.Never.

- DepthTest.Never
- DepthTest.Always
- DepthTest.Less
- DepthTest.LessOrEqual
- DepthTest.Equal
- DepthTest.GreaterOrEqual
- DepthTest.Greater
- DepthTest.NotEqual

See also Qt3DRender::QDepthTest::DepthFunction.