Check "All primitives MUST have the same number of morph targets"
scurest opened this issue · 4 comments
The spec says
All primitives MUST have the same number of morph targets in the same order.
I believe that means this should be invalid
"primitives" : [
{
"attributes" : {
"POSITION" : 0
},
"indices" : 1,
"material" : 0
},
{
"attributes" : {
"POSITION" : 3
},
"indices" : 4,
"material" : 1,
"targets" : [
{
"POSITION" : 5
}
]
}
],
It passes validation when using https://github.khronos.org/glTF-Validator/ though.
Good catch. I think we need to clarify the spec first. Opened KhronosGroup/glTF#2154.
Actually I realized this is already checked, but it depends on the primitive order; it only starts checking the lengths after the first primitive with a targets
. So swapping those primitives above would trigger the error. That's definitely wrong (primitive order does not affect validity) right?
That's definitely wrong (primitive order does not affect validity) right?
I agree that the validation bug is there but the correct report (i.e., whether the snippet above is valid or not) would depend on the clarified spec language.
The new version has been released.