14 hours ago, noodleBowl said:And because I would want to draw a variety of the above, which may all have different transforms. I cannot put them into one buffer and save on draw calls correct (excluding instancing in this case)?
13 hours ago, Infinisearch said:First of all if they are of the same vertex type you should be able to stick them in the same buffer thus reducing state changes between draw calls. (look at the arguments to a draw call to understand what I mean)
6 hours ago, noodleBowl said:I'm actually not really sure what you are talking about here? The Draw call only has a vertex count and startVertexLocation. Am I looking at the wrong function? The only thing I can think of is the D3D11_INPUT_ELEMENT_DESC needed for a input layout
I think I might have read you wrong in the first quote and added the statement in parenthesis after, I don't really remember what I was thinking when I wrote that. Ignore it for now... if I remember my line of thought I will post it.
7 hours ago, noodleBowl said:More specifically I don't understand why they have changed the InputSlot to 1. Is this because the are binding 2 buffers and using 1 would point to the second buffer (m_instanceBuffer) where the instance modifications are stored? OR is it really just that they are reusing a semantic (TEXCOORD) and the two bound buffers (m_vertexBuffer and m_instanceBuffer) are treated as one big buffer?
This is vertex streams... you should look into them not just for instancing. Basically lets say you have three vertex components, position, normal, and texturecoordinate. You can stick that data into one struct, two structs, or three structs (when I say structs, I mean arrays of structs). If you use multiple arrays you need a way to bind all the arrays, this is what input slots are for. But for instancing the reason you use multiple slots is that the step rate for fetching data from those buffers is different. Per vertex vs. per instance.
7 hours ago, noodleBowl said:In the tutorial they create a InstanceType struct to hold the modifications they want to do to the vertex positions. But in a case of using a transform (model) matrix to do vertex data modifications would it be done the same way instead of using a constant buffer?
Yeah you don't need to use a constant buffer. But there is also another way to implement instancing using the system value SV_instanceid. ( I think thats it) But you should learn that later.