Files
XCEngine/docs/api/resources/mesh/vertexattribute.md

989 B

VertexAttribute

命名空间: XCEngine::Resources

类型: enum class

描述: 顶点属性标志枚举,用于指定网格顶点包含哪些属性。

概述

VertexAttribute 是位标志枚举,用于描述顶点缓冲中包含的顶点属性类型。每种属性对应一个比特位,可以组合使用。

枚举值

描述
Position 顶点位置 (x, y, z)
Normal 法线向量 (x, y, z)
Tangent 切线向量 (x, y, z)
Color 顶点颜色 (r, g, b, a)
UV0 第一组 UV 坐标
UV1 第二组 UV 坐标
UV2 第三组 UV 坐标
UV3 第四组 UV 坐标
BoneWeights 骨骼权重
BoneIndices 骨骼索引

使用示例

VertexAttribute attributes = VertexAttribute::Position | VertexAttribute::Normal | VertexAttribute::UV0;

相关文档