Extending position only support
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user