google / google/bigwheels

[glTF] Support materials without pbrMetallicRoughness

Open
#471 1 comment 0 reactions 1 assignee Claimed by @footballhead View on GitHub
enhancement
Dominant language
C++
Stars
107
Forks
42
PR merge metrics
No merged PRs in 30d

Description

`GltfMaterialSelector::DetermineMaterial` will return the error material for materials that are not unlit and also lack `pbrMetallicRoughness`.

However, the spec says that the defaults should be applied for `pbrMetallicRoughness` if not present (see [5.19](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-material)). That means that `DetermineMaterial` should still return `PPX_MATERIAL_IDENT_STANDARD` and the loading code should apply defaults for the missing values.

This would allow BigWheels to correctly render models like:

- [AnisotropyStrengthTest](https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/AnisotropyStrengthTest)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.