Pārlūkot izejas kodu

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 date
Daniel Hritzkiv 8 gadi atpakaļ
vecāks
revīzija
990fe143a1
1 mainītis faili ar 4 papildinājumiem un 5 dzēšanām
  1. 4 5
      code/glTF2AssetWriter.inl

+ 4 - 5
code/glTF2AssetWriter.inl

@@ -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.color, "COLOR");
-                    WriteAttrs(w, attrs, p.attributes.joint, "JOINT");
-                    WriteAttrs(w, attrs, p.attributes.jointmatrix, "JOINTMATRIX");
-                    WriteAttrs(w, attrs, p.attributes.weight, "WEIGHT");
+                    WriteAttrs(w, attrs, p.attributes.texcoord, "TEXCOORD_0", true);
+                    WriteAttrs(w, attrs, p.attributes.color, "COLOR_0");
+                    WriteAttrs(w, attrs, p.attributes.joint, "JOINTS_0");
+                    WriteAttrs(w, attrs, p.attributes.weight, "WEIGHTS_0");
                 }
                 }
                 prim.AddMember("attributes", attrs, w.mAl);
                 prim.AddMember("attributes", attrs, w.mAl);
             }
             }