Input Layout and Shaders

I've read that the input layout is bound to the vertex format and to the shader. Do you have to create a seperate input layout for every VertexFormat/VertexShader combinationen Thanks.



Answer this question

Input Layout and Shaders

  • Meerc

    Ok. Thank you.
  • JHG JetLane

    Do you mean the new InputLayout from Direct3D 10 or the VertexDeclaration for Direct3D 9 In the case of Direct3D 10 you should use the beta newsgroups for your question. See http://msdn.com/directx/beta for more information.

    Anyway independent form the version you need normally one for each combination of vertex buffers you use as long as you always use the same semantic in your vertex shaders.



  • vinaymishra

    No you don't need a separate input for each combination. You specify the input layout for the needs of your shaders. For example, you can have a VertexFormat with position, normal, texcoords, blend weights and blend indices, and you can pass a mesh with that format to a shader that has a layout that uses only the position, normals & texcoords.

  • Input Layout and Shaders