Add sheen support to PrincipledMaterial
Sheen is the soft retroreflective highlight at grazing angles that gives
fabrics like velvet and satin their characteristic look. It is a second
lighting lobe over the metallic-roughness base layer, using the Charlie
distribution and the Neubelt visibility term as permitted by the glTF
KHR_materials_sheen extension.
It is controlled by sheenColor, sheenColorMap, sheenRoughness,
sheenRoughnessMap and sheenRoughnessChannel. The color doubles as the
strength of the layer, so the default black leaves sheen disabled and
the generated shader unchanged for existing materials.
sheenRoughnessChannel defaults to alpha, which is where glTF packs sheen
roughness. CustomMaterial can drive the layer through the new
SHEEN_COLOR and SHEEN_ROUGHNESS keywords.
Energy conservation uses the extension's albedo scaling, applied to the
layers beneath the sheen, and the sheen is composited before the
clearcoat to match the glTF layering. The directional albedo of the lobe
comes from a curve fitted to its numerically integrated values, rather
than from a lookup texture. Both image based lighting paths get a
dedicated sheen function, since the Charlie lobe is much wider than GGX
and needs its own roughness to mip level mapping.
[ChangeLog][PrincipledMaterial] Added the sheenColor, sheenColorMap,
sheenRoughness, sheenRoughnessMap and sheenRoughnessChannel properties,
which add a fabric-like sheen layer on top of the base material.
Task-number: QTBUG-98047
Change-Id: I65934ccb63633b2691752ccfd7efa7266bc728a9
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| commit | 2db4e25339151027c4ef1b63c0fe8c65758134e9 |
| parent | 0c2b6e710374277aa9dde8645404b42d80c3d59c |
| author | Andy Nichols <andy.nichols@qt.io> |
| committer | Andy Nichols <andy.nichols@qt.io> |
| commit time | Tue, 29 Sep 2026 11:22:24 +0000 |
- M examples/quick3d/principledmaterial/CMakeLists.txt
- A examples/quick3d/principledmaterial/SheenPane.qml
- M examples/quick3d/principledmaterial/main.qml
- M examples/quick3d/principledmaterial/qml.qrc
- M src/quick3d/designer/PrincipledMaterialSection.qml
- M src/quick3d/designer/propertyGroups.json
- M src/quick3d/qquick3dcustommaterial.cpp
- M src/quick3d/qquick3dprincipledmaterial.cpp
- M src/quick3d/qquick3dprincipledmaterial_p.h
- M src/runtimerender/CMakeLists.txt
- M src/runtimerender/graphobjects/qssgrendercustommaterial_p.h
- M src/runtimerender/graphobjects/qssgrenderdefaultmaterial_p.h
- M src/runtimerender/qssgrenderableimage_p.h
- M src/runtimerender/qssgrenderdefaultmaterialshadergenerator.cpp
- M src/runtimerender/qssgrendershaderkeys_p.h
- M src/runtimerender/qssgrhicontext_p.h
- M src/runtimerender/qssgshadermaterialadapter.cpp
- M src/runtimerender/qssgshadermaterialadapter_p.h
- M src/runtimerender/rendererimpl/qssglayerrenderdata.cpp
- M src/runtimerender/rendererimpl/qssgvertexpipelineimpl.cpp
- M src/runtimerender/res/effectlib/funcprocessPunctualLighting.glsllib
- M src/runtimerender/res/effectlib/sampleProbe.glsllib
- M src/runtimerender/res/effectlib/sampleReflectionProbe.glsllib
- A src/runtimerender/res/effectlib/sheen.glsllib
- M src/runtimerender/resourcemanager/qssgrendershaderlibrarymanager_p.h
- M tests/auto/quick3d/qquick3dmaterials/tst_qquick3dmaterials.cpp
- A tests/baseline/data/principled/sheen.qml