QAlphaTest

The QAlphaTest class specify alpha reference test. More

Inheritance diagram of PySide6.Qt3DRender.Qt3DRender.QAlphaTest

Synopsis

Functions

Slots

Signals

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

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

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

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

alphaFunctionAlphaFunction

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

float

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

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

referenceValue – float

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

alphaFunctionAlphaFunction

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

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

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.