for using instancing with transform buffers you have to add this to your shader:
Variable Declaration:
StructuredBuffer<float4x4> Transform;
add instance id to your input structure:
struct vsInput
{
....
uint ii : SV_InstanceID;
};
In Vertex Shader read the buffer based on this id:
float4x4 tW = Transform[In.ii];
Apply it to the vertex positions of your geometry:
float4 PosW = mul(In.PosO,tW);
done.
Knowing this you can add what ever buffers you like to your shader, also passing for example colors to pixel shader. Then you need to read the color buffer in the vertex shader and pass it to the pixel shader just like the other attribute data