您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
21 行
911 B
21 行
911 B
using UnityEngine;
|
|
using UnityEngine.Rendering;
|
|
|
|
namespace UniVRM10
|
|
{
|
|
internal static class MeshVertexUtility
|
|
{
|
|
public static void SetVertexBufferParamsToMesh(Mesh mesh, int length)
|
|
{
|
|
mesh.SetVertexBufferParams(length, new VertexAttributeDescriptor[]
|
|
{
|
|
new VertexAttributeDescriptor(VertexAttribute.Position, stream: 0),
|
|
new VertexAttributeDescriptor(VertexAttribute.Normal, stream: 0),
|
|
new VertexAttributeDescriptor(VertexAttribute.Color, dimension: 4, stream: 1),
|
|
new VertexAttributeDescriptor(VertexAttribute.TexCoord0, dimension: 2, stream: 1),
|
|
new VertexAttributeDescriptor(VertexAttribute.BlendWeight, dimension: 4, stream: 2),
|
|
new VertexAttributeDescriptor(VertexAttribute.BlendIndices, VertexAttributeFormat.UInt16, 4, 2),
|
|
});
|
|
}
|
|
}
|
|
}
|