Kuesa Runtime

MetallicRoughnessEffect Class

class Kuesa::MetallicRoughnessEffect

Kuesa::MetallicRoughnessEffect is a Qt3DRender::QEffect for Kuesa::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...

Header: #include <Kuesa/MetallicRoughnessEffect>
Since: Kuesa 1.0
Instantiated By: MetallicRoughnessEffect
Inherits: Kuesa::GLTF2MaterialEffect

This class was introduced in Kuesa 1.0.

Properties

Public Functions

Qt3DRender::QAbstractTexture *brdfLUT() const
bool isAmbientOcclusionMapEnabled() const
bool isBaseColorMapEnabled() const
bool isEmissiveMapEnabled() const
bool isMetalRoughMapEnabled() const
bool isNormalMapEnabled() const

Public Slots

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

Signals

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

Detailed Description

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

Property Documentation

ambientOcclusionMapEnabled : bool

True to enbale the effect support for ambient occlusion texture

Access functions:

bool isAmbientOcclusionMapEnabled() const
void setAmbientOcclusionMapEnabled(bool enabled)

Notifier signal:

void ambientOcclusionMapEnabledChanged(bool enabled)

baseColorMapEnabled : bool

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

Access functions:

bool isBaseColorMapEnabled() const
void setBaseColorMapEnabled(bool enabled)

Notifier signal:

void baseColorMapEnabledChanged(bool enabled)

brdfLUT : Qt3DRender::QAbstractTexture*

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::MetallicRoughnessMaterial, users should assign a texture to this property of the effect. A shared instance can be retrieved from the Kuesa::TextureCollection using the name "_kuesa_brdfLUT"

This property was introduced in Kuesa 1.1.

Access functions:

Qt3DRender::QAbstractTexture *brdfLUT() const
void setBrdfLUT(Qt3DRender::QAbstractTexture *brdfLUT)

Notifier signal:

void brdfLUTChanged(Qt3DRender::QAbstractTexture *brdfLUT)

emissiveMapEnabled : bool

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

Access functions:

bool isEmissiveMapEnabled() const
void setEmissiveMapEnabled(bool enabled)

Notifier signal:

void emissiveMapEnabledChanged(bool enabled)

metalRoughMapEnabled : bool

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

Access functions:

bool isMetalRoughMapEnabled() const
void setMetalRoughMapEnabled(bool enabled)

Notifier signal:

void metalRoughMapEnabledChanged(bool enabled)

normalMapEnabled : bool

True to enable the effect support for normal maps

Access functions:

bool isNormalMapEnabled() const
void setNormalMapEnabled(bool enabled)

Notifier signal:

void normalMapEnabledChanged(bool enabled)