Lot of changes

This commit is contained in:
Dynamitos
2024-05-16 19:47:35 +02:00
parent 7690434f2b
commit 5fd41b8388
20 changed files with 182 additions and 35 deletions
@@ -18,6 +18,20 @@ struct StaticMeshVertexData : IVertexData
attributes.vertexColor = float3(color[3 * index + 0], color[3 * index + 1], color[3 * index + 2]);
return attributes;
}
VertexAttributes getPosition(uint index)
{
VertexAttributes attributes;
attributes.position_MS = float3(positions[3 * index + 0], positions[3 * index + 1], positions[3 * index + 2]);
attributes.normal_MS = float3(0, 0, 0);
attributes.tangent_MS = float3(0, 0, 0);
attributes.biTangent_MS = float3(0, 0, 0);
for (uint i = 0; i < MAX_TEXCOORDS; ++i)
{
attributes.texCoords[i] = float2(0, 0);
}
attributes.vertexColor = float3(0, 0, 0);
return attributes;
}
StructuredBuffer<float> positions;
StructuredBuffer<float> normals;
StructuredBuffer<float> tangents;
+2 -1
View File
@@ -8,7 +8,8 @@ struct VertexInput
interface IVertexData
{
VertexAttributes getAttributes(uint index);
VertexAttributes getAttributes(uint index);
VertexAttributes getPosition(uint index);
};
layout(set=1)