From 990fe143a131f96cec74c841567e9b20230220a8 Mon Sep 17 00:00:00 2001 From: Daniel Hritzkiv Date: Fri, 8 Sep 2017 15:54:03 -0400 Subject: [PATCH] =?UTF-8?q?Fix=20mesh=20primitive=E2=80=99s=20attributes?= =?UTF-8?q?=E2=80=99=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- code/glTF2AssetWriter.inl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/code/glTF2AssetWriter.inl b/code/glTF2AssetWriter.inl index e62f2377e..ed599c23e 100644 --- a/code/glTF2AssetWriter.inl +++ b/code/glTF2AssetWriter.inl @@ -380,11 +380,10 @@ namespace glTF2 { { WriteAttrs(w, attrs, p.attributes.position, "POSITION"); 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); }