QDepthTest¶
The
QDepthTest
class tests the fragment shader’s depth value against the depth of a sample being written to. More…
Synopsis¶
Functions¶
def
depthFunction
()
Slots¶
def
setDepthFunction
(depthFunction)
Signals¶
def
depthFunctionChanged
(depthFunction)
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, thenQDepthTest
does nothing.See also
QAlphaTest
QStencilTest
- class PySide2.Qt3DRender.Qt3DRender.QDepthTest([parent=None])¶
- param parent:
The constructor creates a new
QDepthTest
instance with the specifiedparent
.
- PySide2.Qt3DRender.Qt3DRender.QDepthTest.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
- PySide2.Qt3DRender.Qt3DRender.QDepthTest.depthFunction()¶
- Return type:
Holds the current function used by depth test. The default is Never.
- PySide2.Qt3DRender.Qt3DRender.QDepthTest.depthFunctionChanged(depthFunction)¶
- Parameters:
depthFunction –
DepthFunction
- PySide2.Qt3DRender.Qt3DRender.QDepthTest.setDepthFunction(depthFunction)¶
- Parameters:
depthFunction –
DepthFunction
Holds the current function used by depth test. The default is Never.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.