mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-09 12:29:23 -05:00
マイグレーション時に古い頂点Attributeが残っていた(TANGENT, COLOR_0, TEXCOORD_1)
This commit is contained in:
@@ -82,6 +82,7 @@ namespace UniVRM10
|
||||
var uv = AddAccessor<Vector2>(mesh.VertexBuffer.TexCoords);
|
||||
var weights = AddAccessor<Vector4>(mesh.VertexBuffer.Weights);
|
||||
var joints = AddAccessor<UShort4>(mesh.VertexBuffer.Joints);
|
||||
var color = AddAccessor<Vector4>(mesh.VertexBuffer.Colors);
|
||||
|
||||
var morphTargets = new MorphAccessor[] { };
|
||||
if (mesh.MorphTargets != null)
|
||||
@@ -99,7 +100,10 @@ namespace UniVRM10
|
||||
gltfPrim.indices = AddAccessor(subIndices);
|
||||
gltfPrim.attributes.POSITION = position.Value;
|
||||
gltfPrim.attributes.NORMAL = normal.Value;
|
||||
gltfPrim.attributes.TANGENT = -1;
|
||||
gltfPrim.attributes.COLOR_0 = color.GetValueOrDefault(-1);
|
||||
gltfPrim.attributes.TEXCOORD_0 = uv.Value;
|
||||
gltfPrim.attributes.TEXCOORD_1 = -1;
|
||||
gltfPrim.attributes.WEIGHTS_0 = weights.GetValueOrDefault(-1);
|
||||
gltfPrim.attributes.JOINTS_0 = joints.GetValueOrDefault(-1);
|
||||
foreach (var (gltfMorph, morph) in Enumerable.Zip(gltfPrim.targets, morphTargets, (l, r) => (l, r)))
|
||||
|
||||
Reference in New Issue
Block a user