struct cbDOFProperties
{
float _focalWidth;
float _focalDepth;
float _farClip;
float _padding;
XMFLOAT2 _filterTaps[12];
};
Now the same in my shader:
cbuffer cbDOFProperties : register(b0)
{
float _focalWidth;
float _focalDepth;
float _farClip;
float _padding;
float2 _filterTaps[12];
};
The problem I'm having is that I'm getting a warning telling me:
D3D11: WARNING: ID3D11DeviceContext::DrawIndexed: The size of the Constant Buffer at slot 0 of the Pixel Shader unit is too small (112 bytes provided, 208 bytes, at least, expected).
I don't get it. the size of a float2 would be 2*4 byte = 8 bytes * 12 = 96 bytes + 4x floats = 112 bytes like it tells me I've provided. Then why is it expecting 208 ???