QDepthRange Class

class Qt3DRender::QDepthRange

Enables remapping depth values written into the depth buffer. More...

Header: #include <QDepthRange>
qmake: QT += 3drender
Since: Qt 5.14
Instantiated By: DepthRange
Inherits: Qt3DRender::QRenderState

This class was introduced in Qt 5.14.

Detailed Description

By default, OpenGL writes scene depth information into the depth buffer in the range [0.0, 1.0] with 0.0 corresponding to the near clip plane and 1.0 to the far clip plane. QDepthRange allows mapping these values into a different range so parts of the scene are always rendered in front of or behind other parts. Valid values for near and far are between 0 and 1.