Files
Seele/res/shaders/lib/DebugVertexData.slang
T

17 lines
492 B
Plaintext
Raw Normal View History

2024-01-11 21:40:46 +01:00
import Common;
import VertexData;
import MaterialParameter;
struct StaticMeshVertexData : IVertexData
{
VertexAttributes getAttributes(uint index)
{
VertexAttributes attributes;
attributes.position_MS = float3(positions[3 * index + 0], positions[3 * index + 1], positions[3 * index + 2]);
attributes.vertexColor = float3(color[3 * index + 0], color[3 * index + 1], color[3 * index + 2]);
return attributes;
}
StructuredBuffer<float> positions;
StructuredBuffer<float> color;
};