Fix mesh primitive’s attributes’ names
Per spec TEXCOORD -> TEXCOORD_0 COLOR -> COLOR_0 JOINTS -> JOINTS_0 WEIGHTS -> WEIGHTS_0 Remove JOINTMATRIX since it’s not supported (and doesn’t seem to be output, anyway) TANGENT should be added at a later datepull/1423/head
parent
816e6909ca
commit
990fe143a1
|
@ -380,11 +380,10 @@ namespace glTF2 {
|
||||||
{
|
{
|
||||||
WriteAttrs(w, attrs, p.attributes.position, "POSITION");
|
WriteAttrs(w, attrs, p.attributes.position, "POSITION");
|
||||||
WriteAttrs(w, attrs, p.attributes.normal, "NORMAL");
|
WriteAttrs(w, attrs, p.attributes.normal, "NORMAL");
|
||||||
WriteAttrs(w, attrs, p.attributes.texcoord, "TEXCOORD", true);
|
WriteAttrs(w, attrs, p.attributes.texcoord, "TEXCOORD_0", true);
|
||||||
WriteAttrs(w, attrs, p.attributes.color, "COLOR");
|
WriteAttrs(w, attrs, p.attributes.color, "COLOR_0");
|
||||||
WriteAttrs(w, attrs, p.attributes.joint, "JOINT");
|
WriteAttrs(w, attrs, p.attributes.joint, "JOINTS_0");
|
||||||
WriteAttrs(w, attrs, p.attributes.jointmatrix, "JOINTMATRIX");
|
WriteAttrs(w, attrs, p.attributes.weight, "WEIGHTS_0");
|
||||||
WriteAttrs(w, attrs, p.attributes.weight, "WEIGHT");
|
|
||||||
}
|
}
|
||||||
prim.AddMember("attributes", attrs, w.mAl);
|
prim.AddMember("attributes", attrs, w.mAl);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue