public Type GetCompatibleVertexType() { var hasNormals = Normals != null; var hasTangents = hasNormals && Tangents != null; int numCols = 0; if (Colors0 != null) { numCols = 1; } if (numCols == 1 && Colors1 != null) { numCols = 2; } int numTexs = 0; if (TexCoords0 != null) { numTexs = 1; } if (numTexs == 1 && TexCoords1 != null) { numTexs = 2; } if (numTexs == 2 && TexCoords2 != null) { numTexs = 3; } if (numTexs == 3 && TexCoords3 != null) { numTexs = 4; } int numJoints = 0; if (Joints0 != null) { numJoints = 4; } if (Joints0 != null && Joints1 != null) { numJoints = 8; } return(VertexUtils.GetVertexBuilderType(hasNormals, hasTangents, numCols, numTexs, numJoints)); }