QAlphaTest#

The QAlphaTest class specify alpha reference test. More

Inheritance diagram of PySide6.Qt3DRender.Qt3DRender.QAlphaTest

Synopsis#

Properties#

Functions#

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#

As the OpenGL documentation explains; The alpha test discards a fragment conditional on the outcome of a comparison between the incoming fragment’s alpha value and a constant reference value.

class PySide6.Qt3DRender.Qt3DRender.QAlphaTest([parent=None])#
Parameters:

parentPySide6.Qt3DCore.Qt3DCore.QNode

Note

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

property PᅟySide6.Qt3DRender.Qt3DRender.QAlphaTest.alphaFunction: AlphaFunction#

Holds the alpha function used by the alpha test. Default is Never.

Access functions:
property PᅟySide6.Qt3DRender.Qt3DRender.QAlphaTest.referenceValue: float#

Holds the reference value used by the alpha test. Default is 0.0. When set, the value is clamped between 0 and 1.

Access functions:
PySide6.Qt3DRender.Qt3DRender.QAlphaTest.AlphaFunction#

Enumeration for the alpha function values

Constant

Description

Qt3DRender.QAlphaTest.Never

Never pass alpha test

Qt3DRender.QAlphaTest.Always

Always pass alpha test

Qt3DRender.QAlphaTest.Less

Pass alpha test if fragment alpha is less than reference value

Qt3DRender.QAlphaTest.LessOrEqual

Pass alpha test if fragment alpha is less than or equal to reference value

Qt3DRender.QAlphaTest.Equal

Pass alpha test if fragment alpha is equal to reference value

Qt3DRender.QAlphaTest.GreaterOrEqual

Pass alpha test if fragment alpha is greater than or equal to reference value

Qt3DRender.QAlphaTest.Greater

Pass alpha test if fragment alpha is greater than reference value

Qt3DRender.QAlphaTest.NotEqual

Pass alpha test if fragment alpha is not equal to reference value

PySide6.Qt3DRender.Qt3DRender.QAlphaTest.alphaFunction()#
Return type:

AlphaFunction

Getter of property alphaFunction .

PySide6.Qt3DRender.Qt3DRender.QAlphaTest.alphaFunctionChanged(alphaFunction)#
Parameters:

alphaFunctionAlphaFunction

Notification signal of property alphaFunction .

PySide6.Qt3DRender.Qt3DRender.QAlphaTest.referenceValue()#
Return type:

float

Getter of property referenceValue .

PySide6.Qt3DRender.Qt3DRender.QAlphaTest.referenceValueChanged(referenceValue)#
Parameters:

referenceValue – float

Notification signal of property referenceValue .

PySide6.Qt3DRender.Qt3DRender.QAlphaTest.setAlphaFunction(alphaFunction)#
Parameters:

alphaFunctionAlphaFunction

See also

alphaFunction()

Setter of property alphaFunction .

PySide6.Qt3DRender.Qt3DRender.QAlphaTest.setReferenceValue(referenceValue)#
Parameters:

referenceValue – float

See also

referenceValue()

Setter of property referenceValue .