Closed nyalldawson closed 10 months ago
The spec says emissiveFactor is number[3]
, so I think we should report it as error, not warning.
https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-material
What is gltf-validator's result to emissiveFactor with number[4]
?
How about if I add an optional "flags" argument to model loading, with a "permissive" flag which enables workarounds like this?
Adding a flag to control the parsing behavior would be a nice idea. For example...
TinyGLTF::SetParseStrictness(enum)
@syoyo how's that now?
@syoyo how's that now?
Thanks! Let me give some time to review it.
Merged!
Raise a warning when encountering emissiveFactor with array length of 4 and truncate to the first 3 elements, instead of aborting the model loading entirely.