Hello,
I was checking Hieroglyph 3 source code and I think I found something really useful...
It looks like you can use the same array D3D11_INPUT_ELEMENT_DESC array to create multiple InputLayout permutations.
m_iPointLightIL = Renderer.CreateInputLayout( inputElements, m_PointLightEffect[0].GetVertexShader() );
m_iSpotLightIL = Renderer.CreateInputLayout( inputElements, m_SpotLightEffect[0].GetVertexShader() );
m_iDirectionalLightIL = Renderer.CreateInputLayout( inputElements, m_DirectionalLightEffect[0].GetVertexShader() );
As you can see the CreateInputLayout function is called 3 times using the same inputElements to create multiple (different) InputLayouts.
So the D3D Device goes through the inputElements and picks the ones that match the semantics (and format, etc) in the vertex shader input and ignores the rest?
Is this referred somewhere in the documentation and I simply missed it?
This will greatly simplify my tools and InputLayout management so thanks MJP .