Hello,
I pass a material definition structure from c++ to hlsl however in the debug view I see some of the values are NAN
here is my c++, hlsl structure definitions and debug view results. Only unused0 must be NAN I use it as padding variable, however
all other float values are olso NAN I couldn't point out the problem here, may be you can
C++ structure
struct MaterialData {
Vector3 diffuseColor;
float unused0;
Vector3 specularColor;
float specularLevel;
Vector3 ambientColor;
float glossiness;
};
Shader structure
struct material {
float3 diffuseColor;
float unused0;
float3 specularColor;
float specularLevel;
float3 ambientColor;
float glossiness;
};
Shader debug values
diffuseColor x = 0.588000000, y = 0.588000000, z = 0.588000000 float3
unused0 NaN float
specularColor x = 0.900000000, y = 0.900000000, z = 0.900000000 float3
specularLevel NaN float
ambientColor x = 0.588000000, y = 0.588000000, z = 0.588000000 float3
glossiness NaN float