Kuesa Runtime

GLTF2MaterialEffect Class

class Kuesa::GLTF2MaterialEffect

GLTF2MaterialEffect is a subclass of Qt3DRender::QEffect and is the base class of all GLTF2 based material effect subclasses. More...

Header: #include <Kuesa/GLTF2MaterialEffect>
Since: Kuesa 1.2
Instantiated By: GLTF2MaterialEffect
Inherited By:

Kuesa::Iro2AlphaEquiRectEffect, Kuesa::Iro2AlphaSemEffect, Kuesa::Iro2DiffuseEquiRectEffect, Kuesa::Iro2DiffuseSemEffect, Kuesa::Iro2GlassEquiRectEffect, Kuesa::Iro2GlassSemEffect, Kuesa::Iro2MatteAlphaEffect, Kuesa::Iro2PlanarReflectionEquiRectEffect, Kuesa::Iro2PlanarReflectionSemEffect, Kuesa::IroDiffuseAlphaEffect, Kuesa::IroDiffuseEffect, Kuesa::IroDiffuseHemiEffect, Kuesa::IroGlassAddEffect, Kuesa::IroMatteAddEffect, Kuesa::IroMatteAlphaEffect, Kuesa::IroMatteBackgroundEffect, Kuesa::IroMatteMultEffect, Kuesa::IroMatteOpaqueEffect, Kuesa::IroMatteSkyboxEffect, Kuesa::MetallicRoughnessEffect, and Kuesa::UnlitEffect

This class was introduced in Kuesa 1.2.

Properties

Public Functions

bool isAlphaCutoffEnabled() const
bool isDoubleSided() const
bool isInstanced() const
bool isOpaque() const
bool isUsingColorAttribute() const
bool isUsingMorphTargets() const
bool isUsingNormalAttribute() const
bool isUsingSkinning() const
bool isUsingTangentAttribute() const
bool isUsingTexCoord1Attribute() const
bool isUsingTexCoordAttribute() const

Public Slots

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

Signals

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

Detailed Description

It holds properties to specify which features are enabled such as:

Property Documentation

alphaCutoffEnabled : bool

Returns whether alphaCutOffIsEnabled or not. If true, alpha cutoff is enabled. Fragments with an alpha value above a threshold are rendered as opaque while fragment an alpha value below the threshold are discarded

Note: The threshold value used will be GLTF2MaterialProperties::alphaCutoff of the material properties set on the material that uses the effect.

This property was introduced in Kuesa 1.2.

Access functions:

bool isAlphaCutoffEnabled() const
void setAlphaCutoffEnabled(bool enabled)

Notifier signal:

void alphaCutoffEnabledChanged(bool enabled)

doubleSided : bool

Returns whether the meshes to be rendered with this effect are double sided.

This property was introduced in Kuesa 1.2.

Access functions:

bool isDoubleSided() const
void setDoubleSided(bool doubleSided)

Notifier signal:

void doubleSidedChanged(bool doubleSided)

opaque : bool

Returns whether the content to be draw is opaque or transparent. If false, alpha blending is enabled for this effect

This property was introduced in Kuesa 1.2.

Access functions:

bool isOpaque() const
void setOpaque(bool opaque)

Notifier signal:

void opaqueChanged(bool opaque)

usingColorAttribute : bool

If true, the base color property is multiplied by the color interpolated attribute of the mesh

This property was introduced in Kuesa 1.3.

Access functions:

bool isUsingColorAttribute() const
void setUsingColorAttribute(bool usingColorAttribute)

Notifier signal:

void usingColorAttributeChanged(bool usingColorAttribute)

usingMorphTargets : bool

If true, the morphtarget support is enabled.

This property was introduced in Kuesa 1.3.

Access functions:

bool isUsingMorphTargets() const
void setUsingMorphTargets(bool usingMorphTargets)

Notifier signal:

void usingMorphTargetsChanged(bool usingMorphTargets)

usingNormalAttribute : bool

If true, the normal attribute provided by the mesh is used.

This property was introduced in Kuesa 1.3.

Access functions:

bool isUsingNormalAttribute() const
void setUsingNormalAttribute(bool usingNormalAttribute)

Notifier signal:

void usingNormalAttributeChanged(bool usingNormalAttribute)

usingSkinning : bool

Returns whether vertex skinning is enabled or not. If true, a skinning enabled vertex shader is used instead of the default one. This allows to use this effect for rendering skinned meshes

Note: If enabled, CPU side frustum culling is not performed for the entities using that effect. Therefore, this should be enabled on effects used to render geometries where the CPU side computed bounding volume doesn't match what a standard vertex shader would compute (skyboxes, instancing ...). Additionally, the View::skinning property needs to be enabled on the View or ForwardRenderer for skinning effects to be taken into account.

This property was introduced in Kuesa 1.2.

Access functions:

bool isUsingSkinning() const
void setUsingSkinning(bool useSkinning)

Notifier signal:

void usingSkinningChanged(bool useSkinning)

usingTangentAttribute : bool

If true, the tangent attribute provided by the mesh is used.

This property was introduced in Kuesa 1.3.

Access functions:

bool isUsingTangentAttribute() const
void setUsingTangentAttribute(bool usingTangentAttribute)

Notifier signal:

void usingTangentAttributeChanged(bool usingTangentAttribute)

usingTexCoord1Attribute : bool

If true, the texCoord1 attribute provided by the mesh is used.

This property was introduced in Kuesa 1.3.

Access functions:

bool isUsingTexCoord1Attribute() const
void setUsingTexCoord1Attribute(bool usingTexCoord1Attribute)

Notifier signal:

void usingTexCoord1AttributeChanged(bool usingTexCoord1Attribute)

usingTexCoordAttribute : bool

If true, the texCoord attribute provided by the mesh is used.

This property was introduced in Kuesa 1.3.

Access functions:

bool isUsingTexCoordAttribute() const
void setUsingTexCoordAttribute(bool usingTexCoordAttribute)

Notifier signal:

void usingTexCoordAttributeChanged(bool usingTexCoordAttribute)