Kuesa::Qt3D::OpacityMask¶
Module: Kuesa Qt 3D API
Masks onscreen content based on the alpha color value of a mask texture. More...
#include <opacitymask.h>
Inherits from Kuesa::Qt3D::AbstractPostProcessingEffect, Qt3DCore::QNode
Public Signals¶
| Name | |
|---|---|
| void | maskChanged(Qt3DRender::QAbstractTexture * mask) | 
| void | premultipliedAlphaChanged(bool premultipliedAlpha) | 
Public Functions¶
| Name | |
|---|---|
| OpacityMask(Qt3DCore::QNode * parent =nullptr) | |
| virtual FrameGraphNodePtr | frameGraphSubTree() const override | 
| virtual QVector< Qt3DRender::QLayer * > | layers() const override | 
| virtual void | setInputTexture(Qt3DRender::QAbstractTexture * texture) override | 
| void | setMask(Qt3DRender::QAbstractTexture * mask) | 
| Qt3DRender::QAbstractTexture * | mask() const | 
| void | setPremultipliedAlpha(bool premultipliedAlpha) | 
| bool | premultipliedAlpha() const | 
Public Properties¶
| Name | |
|---|---|
| Qt3DRender::QAbstractTexture * | mask | 
| bool | premultipliedAlpha | 
Additional inherited members¶
Public Types inherited from Kuesa::Qt3D::AbstractPostProcessingEffect
| Name | |
|---|---|
| enum | Type { Custom} | 
| using QSharedPointer< Qt3DRender::QFrameGraphNode > | FrameGraphNodePtr | 
Public Functions inherited from Kuesa::Qt3D::AbstractPostProcessingEffect
| Name | |
|---|---|
| ~AbstractPostProcessingEffect() | |
| Type | type() const | 
| virtual void | setDepthTexture(Qt3DRender::QAbstractTexture * texture) | 
| virtual void | setCamera(Qt3DCore::QEntity * camera) | 
| virtual void | setWindowSize(const QSize & sceneSize) | 
Protected Functions inherited from Kuesa::Qt3D::AbstractPostProcessingEffect
| Name | |
|---|---|
| AbstractPostProcessingEffect(Qt3DCore::QNode * parent =nullptr, Type type =Custom) | 
Protected Attributes inherited from Kuesa::Qt3D::AbstractPostProcessingEffect
| Name | |
|---|---|
| const Type | m_type | 
Detailed Description¶
1 |  | 
Masks onscreen content based on the alpha color value of a mask texture.
Given an RGBA mask texture, content of the backbuffer will be rendered as:
1 |  | 

A premultiplied alpha variant of the algorithm is also available which can be of use when combining Qt 3D / Kuesa content with 2D QtQuick content (Scene3D). It performs rendering doing:
1 |  | 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  |  | 

Public Signals Documentation¶
signal maskChanged¶
1 2 3  |  | 
signal premultipliedAlphaChanged¶
1 2 3  |  | 
Public Functions Documentation¶
function OpacityMask¶
1 2 3  |  | 
function frameGraphSubTree¶
1 |  | 
Note: The lifetime of the returned subtree is assumed to be managed by the shared pointer. Any caller reparenting the subtree to add to a
Reimplements: Kuesa::Qt3D::AbstractPostProcessingEffect::frameGraphSubTree
Returns a FrameGraph subtree corresponding to the effect's implementation.
function layers¶
1 |  | 
Reimplements: Kuesa::Qt3D::AbstractPostProcessingEffect::layers
Return the layers provided by this effect. This will generally be the layer of a
function setInputTexture¶
1 2 3  |  | 
Reimplements: Kuesa::Qt3D::AbstractPostProcessingEffect::setInputTexture
Sets the input texture to texture for this effect. The texture contain the rendered scene that the effect will be applied to. This is set automatically by the ForwardRenderer when the effect is added.
function setMask¶
1 2 3  |  | 
function mask¶
1 |  | 
function setPremultipliedAlpha¶
1 2 3  |  | 
function premultipliedAlpha¶
1 |  | 
Public Property Documentation¶
property mask¶
1 |  | 
The RGBA texture to use as a mask.
property premultipliedAlpha¶
1 |  | 
Specifies whether the masking should be performed using premultipliedAlpha. This can be useful when combining Kuesa and QtQuick with a Scene3D element. It is false by default.
Updated on 2023-07-03 at 11:02:10 +0000