Alright, I'm having a hard time getting a bool packed and aligned into a hlsl constant buffer and I'm not sure why.
Here is the buffer in hlsl
cbuffer MaterialBuffer : register(b1) {
float3 materialDiffuseAlbedo;
float materialSpecularExponent;
float3 materialSpecularAlbedo;
bool isTextured;
};
And here it is in c++
struct GeometryBufferPass_MaterialBuffer {
XMFLOAT3 diffuse;
float specularExponent;
XMFLOAT3 specular;
bool isTextured;
};
I've tried moving the bool and padding the struct in all kinds of ways with no luck. What is the correct way to do this?