   HLSL question, semantics
  On MSDN it says "n is an optional integer between 0 and the number of resources supported" after the sematic tables (link). I would like to know what "resources" refers to.[Edited by - Hannesnisula on April 28, 2009 1:42:38 PM]
  In the table above that statement, there are several different semantics that have an 'n' in them, such as TEXCOORDS.  The resources are the number of available slots for each of those items.   ;  What kind of slots and how to find out how many are available? If I have a struct with 3 variables of TEXCOORD I have to assign them to different slots or they'll overwrite the preceding ones?   ;  When you see for instance TEXCOORD[n] in the documentation, this means that you can have TEXCOORD0, TEXCOORD1, TEXCOORD2 ... The semantic helps you to match the variables in your shader and the data of your input mesh (described in a vertex declaration).For pixels shaders it helps to match the output of the vertex shader and the input of the pixel shader.D3DVERTEXELEMENT9 have a usage member of type D3DDECLUSAGE and a usageIndex.If your mesh have two texture coordinates, you will have - a vertex element with D3DDECLUSAGE_TEXCOORD usage and usageIndex at 0- another vertex element with D3DDECLUSAGE_TEXCOORD usage and usageIndex at 1Inside of your vertex shader you will have two texture coordinates inputs. For instancefloat2 texcoord0 : TEXCOORD0;float2 texcoord1 : TEXCOORD1;As your semantic tells the kind of data (Texture coordinate) and the usage index (0 or 1), overwrite is impossible.   