Map the four BRDF material extensions in the glTF importer
With sheen, anisotropy, iridescence and dispersion now representable in
PrincipledMaterial, the native glTF importer can carry them across.
Until now an asset listing any of them in extensionsRequired failed to
load, and one merely using them silently lost the effect.
All four are mapped completely. Sheen's color factor is linear in the
asset and becomes an sRGB color, as the base color factor already does,
and anisotropy's rotation becomes degrees instead of radians.
Everything else passes through unchanged, and the texture channels the
extensions prescribe are the ones the properties default to.
An anisotropic material also asks the mesh builder for tangents. The
extension requires either mesh tangents or a normal texture, but
without either the shader would fall back to a basis derived from the
normal alone, unrelated to the direction the grain was aimed in.
Generating tangents from UV0 gives the intended orientation.
[ChangeLog][Asset Import] Assets using KHR_materials_sheen,
KHR_materials_anisotropy, KHR_materials_iridescence or
KHR_materials_dispersion now import with those effects intact. Assets
that listed any of them in extensionsRequired previously failed to load
and now load.
Task-number: QTBUG-98047
Task-number: QTBUG-148677
Task-number: QTBUG-148681
Task-number: QTBUG-148682
Change-Id: Ida68076956f8cb5b78082e81c1dd1a13af825e20
Reviewed-by: Christian Strømme <christian.stromme@qt.io>