Skip to content

Kuesa::Qt3D

Module: Kuesa Qt 3D API

Kuesa::Qt3D::ClearCoatMetallicRoughnessMaterialExtension extends the default physically based rendering (PBR) material based on the glTF 2.0 material description with support for the KHR_materials_clearcoat extension. More...

Public Types

Name
using std::function< Qt3DRender::QEffect *()> EffectCreator
using QSharedPointer< SceneStages > SceneStagesPtr
using QSharedPointer< ReflectionStages > ReflectionStagesPtr
using QSharedPointer< ShadowMap > ShadowMapPtr
using GLTF2Import::Material::KDABCustomMaterial::Property::Variant Variant
using std::vector< const Kuesa::GLTF2Import::HierarchyNode * > Path

Public Attributes

Name
constexpr const auto TextureSize
constexpr const auto WorkGroupSize
const auto morphTargetAttributeRegExps

Detailed Description

1
class Kuesa::Qt3D;

Kuesa::Qt3D::ClearCoatMetallicRoughnessMaterialExtension extends the default physically based rendering (PBR) material based on the glTF 2.0 material description with support for the KHR_materials_clearcoat extension.

See:

Since: Kuesa 2.1

Note: ClearCoatMetallicRoughnessMaterialExtension's behavior is implemented using a custom shader graph and layers on the MetallicRoughnessEffect. Some changes in the properties will activate or deactivate some nodes of the shader graph and will trigger a recompilation of the shader. It is recommended to create the variations of the material that you need once up front at application initialisation time.

It is configured through the set of properties held on the ClearCoatProperties instances it can receive.

Public Types Documentation

using EffectCreator

1
using Qt3D::EffectCreator =  std::function<Qt3DRender::QEffect *()>;

using SceneStagesPtr

1
using Qt3D::SceneStagesPtr =  QSharedPointer<SceneStages>;

using ReflectionStagesPtr

1
using Qt3D::ReflectionStagesPtr =  QSharedPointer<ReflectionStages>;

using ShadowMapPtr

1
using Qt3D::ShadowMapPtr =  QSharedPointer<ShadowMap>;

using Variant

1
using Qt3D::Variant =  GLTF2Import::Material::KDABCustomMaterial::Property::Variant;

using Path

1
using Qt3D::Path =  std::vector<const Kuesa::GLTF2Import::HierarchyNode *>;

Public Attributes Documentation

variable TextureSize

1
static constexpr const auto TextureSize = 1024;

variable WorkGroupSize

1
static constexpr const auto WorkGroupSize = 128;

variable morphTargetAttributeRegExps

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
static const auto morphTargetAttributeRegExps = []() {
    const QString morphTargetAttributePattern = QStringLiteral(R"(%1(_\d+)?)");
    const QString morphTargetBaseAttributeNames[]{
        QAttribute::defaultPositionAttributeName(),
        QAttribute::defaultNormalAttributeName(),
        QAttribute::defaultTangentAttributeName()
    };


    constexpr int32_t maxEntries = sizeof(morphTargetBaseAttributeNames) / sizeof(morphTargetBaseAttributeNames[0]);
    std::array<QRegularExpression, maxEntries> regExps;

    for (int32_t i = 0; i < maxEntries; ++i) {
        const QString &baseAttributeName = morphTargetBaseAttributeNames[i];
        QRegularExpression &re = regExps[i];
        re.setPattern(morphTargetAttributePattern.arg(baseAttributeName));
        assert(re.isValid());
    }
    return regExps;
}();

Updated on 2023-07-03 at 11:02:09 +0000