mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-11 13:04:17 -05:00
GetAsSkinJointsArray と GetAsVector4Array を使う
This commit is contained in:
parent
67a2d17958
commit
c0d1fa840d
|
|
@ -234,10 +234,10 @@ namespace UniVRM10
|
|||
var normals = mesh.VertexBuffer.Normals.Bytes.Reinterpret<Vector3>(1);
|
||||
var texCoords = mesh.VertexBuffer.TexCoords.Bytes.Reinterpret<Vector2>(1);
|
||||
var weights = meshGroup.Skin != null
|
||||
? mesh.VertexBuffer.Weights.Bytes.Reinterpret<Vector4>(1)
|
||||
? mesh.VertexBuffer.Weights.GetAsVector4Array()
|
||||
: default;
|
||||
var joints = meshGroup.Skin != null
|
||||
? mesh.VertexBuffer.Joints.Bytes.Reinterpret<SkinJoints>(1)
|
||||
? mesh.VertexBuffer.Joints.GetAsSkinJointsArray()
|
||||
: default;
|
||||
|
||||
interleaveVertexJob = new InterleaveMeshVerticesJob(
|
||||
|
|
|
|||
|
|
@ -96,13 +96,13 @@ namespace VrmLib
|
|||
{
|
||||
var jointsBuffer = vertexBuffer.Joints;
|
||||
var joints = (jointsBuffer != null || jointsBuffer.Count == 0)
|
||||
? jointsBuffer.Bytes.Reinterpret<SkinJoints>(1)
|
||||
? jointsBuffer.GetAsSkinJointsArray()
|
||||
: arrayManager.CreateNativeArray<SkinJoints>(vertexBuffer.Count) // when MorphTarget only
|
||||
;
|
||||
|
||||
var weightsBuffer = vertexBuffer.Weights;
|
||||
var weights = (weightsBuffer != null || weightsBuffer.Count == 0)
|
||||
? weightsBuffer.Bytes.Reinterpret<Vector4>(1)
|
||||
? weightsBuffer.GetAsVector4Array()
|
||||
: arrayManager.CreateNativeArray<Vector4>(vertexBuffer.Count) // when MorphTarget only
|
||||
;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user