Hi all.
I have a Skinned Mesh class working nicely in DirectX 12 but I'm finding it's limited to 29 bones. I am using an instance buffer with a few variables (World matrix, material, alpha etc…) and the bone transforms for each instance.
Declared in the shader as:
struct SkinnedInstanceData
{
float4x4 World;
float4x4 TexTransform;
uint MaterialIndex;
float Alpha;
uint ShaderSwitches;
uint Pad;
float4x4 BoneTransforms[29];
};
StructuredBuffer<SkinnedInstanceData> gSkinnedInstanceData : register(t1, space1);
If I change the 29 bones to 30 or more I get a run-time shader compile error as follows:
error X4599: structured buffer elements cannot be larger than 2048 bytes in vs_5_1 (actual size 2064 bytes)
This appears to be a hardware limit on size (the same for constant buffers possibly?)
Obviously 29 bones is quite a small count! How is anyone else managing to get more bone data to the GPU?
Thanks for your help!
Ian