struct Output
{
    float4 Color : TEXCOORD0;
    float4 Position : SV_Position;
};

#include "RootConstants.hlsl"

Output main(uint vertexIndex : SV_VertexID)
{
    Output output;

    ByteAddressBuffer buffer = ResourceDescriptorHeap[BufferIndex];

    uint stride = 28;
    uint offset = vertexIndex * stride;

    float3 pos = asfloat(buffer.Load3(offset));
    float4 col = asfloat(buffer.Load4(offset + 12));

    //output.Position = float4(pos, 1.0f);
    output.Position = mul(ViewProjection, mul(Model, float4(pos, 1.0f)));
    output.Color = col;
    return output;
}
