Extending position only support

This commit is contained in:
Dynamitos
2024-06-19 10:33:19 +02:00
parent e501a69b36
commit 1e91f88355
17 changed files with 75 additions and 112 deletions
+2 -6
View File
@@ -8,6 +8,7 @@ struct StaticMeshVertexData : IVertexData
{
VertexAttributes attributes;
attributes.position_MS = positions[index].xyz;
#ifndef POS_ONLY
attributes.normal_MS = normals[index].xyz;
attributes.tangent_MS = tangents[index].xyz;
attributes.biTangent_MS = biTangents[index].xyz;
@@ -16,14 +17,9 @@ struct StaticMeshVertexData : IVertexData
attributes.texCoords[i] = texCoords[i][index];
}
attributes.vertexColor = color[index].xyz;
#endif
return attributes;
}
VertexAttributes getPosition(uint index)
{
VertexAttributes attributes;
attributes.position_MS = positions[index].xyz;
return attributes;
}
StructuredBuffer<float4> positions;
StructuredBuffer<float4> normals;
StructuredBuffer<float4> tangents;