PySide6.Qt3DRender.Qt3DRender.QDepthTest

class QDepthTest

The QDepthTest class tests the fragment shader’s depth value against the depth of a sample being written to. More

Inheritance diagram of PySide6.Qt3DRender.Qt3DRender.QDepthTest

Synopsis

Properties

Methods

Slots

Signals

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

A QDepthTest class 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, then QDepthTest does nothing.

See also

QAlphaTest QStencilTest

class DepthFunction

Enumeration for the depth function values

Constant

Description

Qt3DRender.QDepthTest.Never

Never pass depth test

Qt3DRender.QDepthTest.Always

Always pass depth test

Qt3DRender.QDepthTest.Less

Pass depth test if fragment depth is less than z-buffer value

Qt3DRender.QDepthTest.LessOrEqual

Pass depth test if fragment depth is less than or equal to z-buffer value

Qt3DRender.QDepthTest.Equal

Pass depth test if fragment depth is equal to z-buffer value

Qt3DRender.QDepthTest.GreaterOrEqual

Pass depth test if fragment depth is greater than or equal to z-buffer value

Qt3DRender.QDepthTest.Greater

Pass depth test if fragment depth is greater than z-buffer value

Qt3DRender.QDepthTest.NotEqual

Pass depth test if fragment depth is not equal to z-buffer value

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property depthFunctionᅟ: Qt3DRender.QDepthTest.DepthFunction

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

Access functions:
__init__([parent=None])
Parameters:

parentQNode

The constructor creates a new QDepthTest instance with the specified parent.

depthFunction()
Return type:

DepthFunction

See also

setDepthFunction()

Getter of property depthFunctionᅟ .

depthFunctionChanged(depthFunction)
Parameters:

depthFunctionDepthFunction

Notification signal of property depthFunctionᅟ .

setDepthFunction(depthFunction)
Parameters:

depthFunctionDepthFunction

See also

depthFunction()

Setter of property depthFunctionᅟ .