Skip to content

Kuesa::Qt3D::MetallicRoughnessEffect

Module: Kuesa Qt 3D API

Kuesa::Qt3D::MetallicRoughnessEffect is a Qt3DRender::QEffect for Kuesa::Qt3D::MetallicRoughnessMaterial. It provides several properties used to configure the material effect. This is done using a custom shader graph and activating/deactivating different set of nodes of the graph depending on the effect configuration. More...

#include <Kuesa/Qt3D/api/materials/metallicroughnesseffect.h>

Inherits from Kuesa::Qt3D::GLTF2MaterialEffect, Qt3DRender::QEffect

Public Slots

Name
void setBaseColorMapEnabled(bool enabled)
void setMetalRoughMapEnabled(bool enabled)
void setNormalMapEnabled(bool enabled)
void setAmbientOcclusionMapEnabled(bool enabled)
void setEmissiveMapEnabled(bool enabled)
void setBrdfLUT(Qt3DRender::QAbstractTexture * brdfLUT)

Public Signals

Name
void baseColorMapEnabledChanged(bool enabled)
void metalRoughMapEnabledChanged(bool enabled)
void normalMapEnabledChanged(bool enabled)
void ambientOcclusionMapEnabledChanged(bool enabled)
void emissiveMapEnabledChanged(bool enabled)
void brdfLUTChanged(Qt3DRender::QAbstractTexture * brdfLUT)

Public Functions

Name
MetallicRoughnessEffect(Qt3DCore::QNode * parent =nullptr)
~MetallicRoughnessEffect()
bool isBaseColorMapEnabled() const
bool isMetalRoughMapEnabled() const
bool isNormalMapEnabled() const
bool isAmbientOcclusionMapEnabled() const
bool isEmissiveMapEnabled() const
Qt3DRender::QAbstractTexture * brdfLUT() const

Public Properties

Name
bool baseColorMapEnabled
bool metalRoughMapEnabled
bool normalMapEnabled
bool ambientOcclusionMapEnabled
bool emissiveMapEnabled
Qt3DRender::QAbstractTexture * brdfLUT

Additional inherited members

Public Slots inherited from Kuesa::Qt3D::GLTF2MaterialEffect

Name
void setDoubleSided(bool doubleSided)
void setUsingSkinning(bool useSkinning)
void setOpaque(bool opaque)
void setAlphaCutoffEnabled(bool enabled)
void setUsingColorAttribute(bool usingColorAttribute)
void setUsingNormalAttribute(bool usingNormalAttribute)
void setUsingTangentAttribute(bool usingTangentAttribute)
void setUsingTexCoordAttribute(bool usingTexCoordAttribute)
void setUsingTexCoord1Attribute(bool usingTexCoord1Attribute)
void setUsingMorphTargets(bool usingMorphTargets)
void setInstanced(bool instanced)

Public Signals inherited from Kuesa::Qt3D::GLTF2MaterialEffect

Name
void doubleSidedChanged(bool doubleSided)
void usingSkinningChanged(bool useSkinning)
void opaqueChanged(bool opaque)
void alphaCutoffEnabledChanged(bool enabled)
void usingColorAttributeChanged(bool usingColorAttribute)
void usingNormalAttributeChanged(bool usingNormalAttribute)
void usingTangentAttributeChanged(bool usingTangentAttribute)
void usingTexCoordAttributeChanged(bool usingTexCoordAttribute)
void usingTexCoord1AttributeChanged(bool usingTexCoord1Attribute)
void usingMorphTargetsChanged(bool usingMorphTargets)
void instancedChanged(bool instanced)

Public Functions inherited from Kuesa::Qt3D::GLTF2MaterialEffect

Name
GLTF2MaterialEffect(Qt3DCore::QNode * parent =nullptr)
~GLTF2MaterialEffect()
bool isDoubleSided() const
bool isUsingSkinning() const
bool isOpaque() const
bool isAlphaCutoffEnabled() const
bool isUsingColorAttribute() const
bool isUsingNormalAttribute() const
bool isUsingTangentAttribute() const
bool isUsingTexCoordAttribute() const
bool isUsingTexCoord1Attribute() const
bool isUsingMorphTargets() const
bool isInstanced() const

Public Properties inherited from Kuesa::Qt3D::GLTF2MaterialEffect

Name
bool doubleSided
bool usingSkinning
bool opaque
bool alphaCutoffEnabled
bool usingColorAttribute
bool usingNormalAttribute
bool usingTangentAttribute
bool usingTexCoordAttribute
bool usingTexCoord1Attribute
bool usingMorphTargets
bool instanced

Detailed Description

1
class Kuesa::Qt3D::MetallicRoughnessEffect;

Kuesa::Qt3D::MetallicRoughnessEffect is a Qt3DRender::QEffect for Kuesa::Qt3D::MetallicRoughnessMaterial. It provides several properties used to configure the material effect. This is done using a custom shader graph and activating/deactivating different set of nodes of the graph depending on the effect configuration.

Since: Kuesa 2.0

Note: Kuesa::Qt3D::MetallicRoughnessEffect is used to configure the effect for a material, but property values must be provided through Kuesa::Qt3D::MetallicRoughnessMaterial. Therefore, this effect must be added to a Kuesa.MetallicRoughnessMaterial.

Public Slots Documentation

slot setBaseColorMapEnabled

1
2
3
void setBaseColorMapEnabled(
    bool enabled
)

slot setMetalRoughMapEnabled

1
2
3
void setMetalRoughMapEnabled(
    bool enabled
)

slot setNormalMapEnabled

1
2
3
void setNormalMapEnabled(
    bool enabled
)

slot setAmbientOcclusionMapEnabled

1
2
3
void setAmbientOcclusionMapEnabled(
    bool enabled
)

slot setEmissiveMapEnabled

1
2
3
void setEmissiveMapEnabled(
    bool enabled
)

slot setBrdfLUT

1
2
3
void setBrdfLUT(
    Qt3DRender::QAbstractTexture * brdfLUT
)

Public Signals Documentation

signal baseColorMapEnabledChanged

1
2
3
void baseColorMapEnabledChanged(
    bool enabled
)

signal metalRoughMapEnabledChanged

1
2
3
void metalRoughMapEnabledChanged(
    bool enabled
)

signal normalMapEnabledChanged

1
2
3
void normalMapEnabledChanged(
    bool enabled
)

signal ambientOcclusionMapEnabledChanged

1
2
3
void ambientOcclusionMapEnabledChanged(
    bool enabled
)

signal emissiveMapEnabledChanged

1
2
3
void emissiveMapEnabledChanged(
    bool enabled
)

signal brdfLUTChanged

1
2
3
void brdfLUTChanged(
    Qt3DRender::QAbstractTexture * brdfLUT
)

Public Functions Documentation

function MetallicRoughnessEffect

1
2
3
explicit MetallicRoughnessEffect(
    Qt3DCore::QNode * parent =nullptr
)

function ~MetallicRoughnessEffect

1
~MetallicRoughnessEffect()

function isBaseColorMapEnabled

1
bool isBaseColorMapEnabled() const

function isMetalRoughMapEnabled

1
bool isMetalRoughMapEnabled() const

function isNormalMapEnabled

1
bool isNormalMapEnabled() const

function isAmbientOcclusionMapEnabled

1
bool isAmbientOcclusionMapEnabled() const

function isEmissiveMapEnabled

1
bool isEmissiveMapEnabled() const

function brdfLUT

1
Qt3DRender::QAbstractTexture * brdfLUT() const

Public Property Documentation

property baseColorMapEnabled

1
bool baseColorMapEnabled;

True to enable the effect support to specify base color propery with textures

property metalRoughMapEnabled

1
bool metalRoughMapEnabled;

True to enable the effect support to specify metalness and roughness properties with textures

property normalMapEnabled

1
bool normalMapEnabled;

True to enable the effect support for normal maps

property ambientOcclusionMapEnabled

1
bool ambientOcclusionMapEnabled;

True to enbale the effect support for ambient occlusion texture

property emissiveMapEnabled

1
bool emissiveMapEnabled;

True to enable the effect support to specify emissive property with txtures

property brdfLUT

1
Qt3DRender::QAbstractTexture * brdfLUT;

Since: Kuesa 2.0

brdfLUT references a texture containing lookup tables for the split sum approximation in the PBR rendering. This is used internally by the material.

When creating an instance of Kuesa::Qt3D::MetallicRoughnessMaterial, users should assign a texture to this property of the effect. A shared instance can be retrieved from the Kuesa::Qt3D::TextureCollection using the name "_kuesa_brdfLUT"


Updated on 2022-10-18 at 11:12:52 +0200