Maya's DX11Shader adds a plug for every attribute it finds it the FX file. This is fine as I hide them with the correct semantic but I can't get the plugin to ignore them completely and not add the plugs to the node. The plugs are making their way into the FBX which is messing things up on our FBX translator for game. One solution is to not output cbuffers but it would mean more work as we can easily add the sematics to the attribute.
cbuffer LightInfo {
float4 m_afLightPositionX[ 1 ] < string UIWidget = "None"; >;
float4 m_afLightPositionY[ 1 ] < string UIWidget = "None"; >;
float4 m_afLightPositionZ[ 1 ] < string UIWidget = "None"; >;
float4 m_afLightAttenuationX < string UIWidget = "None"; >;
float4 m_afLightAttenuationY < string UIWidget = "None"; >;
float4 m_afLightAttenuationZ < string UIWidget = "None"; >;
float4 m_afLightColour[ 4*1 ] < string UIWidget = "None"; >;
float4 m_afSpecularMask < string UIWidget = "None"; >;
float4 m_AnisotropicDirection < string UIWidget = "None"; >;
float4 m_vConeMultiplier < string UIWidget = "None"; >;
float4 m_vConeAdder < string UIWidget = "None"; >;
float4 m_vLightDirection1 < string UIWidget = "None"; >;
float4 m_vLightDirection2 < string UIWidget = "None"; >;
float4 m_vLightDirection3 < string UIWidget = "None"; >;
float4 m_vLightDirection4 < string UIWidget = "None"; >;
};
I've also got the source code up and running hoping to compile it, but I can't get it to compile on WIndow7 because of a linker error. Error 7 error LNK1104: cannot open file 'D3DX11Effects.lib' C:\Program Files\Autodesk\Maya2014\devkit\plug-ins\dx11Shader\LINK dx11Shader
I have installed the DX11 SDK and setup the correct environment variables used by the linker.