Jump to content


DirectX: What are the (dis)advantages of multi-stream multi-index rendering?


5 replies to this topic

#1 Xcrypt

    New Member

  • Members
  • PipPipPip
  • 144 posts
  • LocationBelgium

Posted 20 November 2012 - 07:55 PM

What are the advantages and disadvantages of multi-stream multi-index rendering? (as is done in a d3d10 sample)
Is it often used in graphics engines? When should I bother to implement it?

---

Also, I'm back guys, I've been off the forums for a while because I changed studies to pure mathematics instead of game dev because I want to do physics programming. But I still want to work on graphics as a side-skill :) Hai to reedbeta - thenut - rouncer - stainless - vilem otte :D


#2 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2718 posts

Posted 20 November 2012 - 08:43 PM

Ive used multiple streams for instancing, in d3d11 - its good for animating loads of instances (an extra matrix per instance) without overblowing the gpu send allowance - But thats classed as multi vertex stream, not multi index, I dont think ive ever used that before, cant think what it would be good for, maybe good for something...
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#3 Xcrypt

    New Member

  • Members
  • PipPipPip
  • 144 posts
  • LocationBelgium

Posted 20 November 2012 - 09:09 PM

Well, I suppose it's not a name you hear tossed around a lot. The name just means that you use multiple vertex buffers for storing index data, and for vertexattributes you only store indices (posindices, texindices, normalindices, ...)
Then you have multiple SRV created from buffers that respresent the actual vertex data, those SRV get bound to the shader as buffers in HLSL, and you can acces them within HLSL with your indices.

#4 Reedbeta

    DevMaster Staff

  • Administrators
  • 5305 posts
  • LocationBellevue, WA

Posted 20 November 2012 - 10:26 PM

I can't really think of any good benefits to rendering this way, honestly. You add an extra layer of indirection and therefore slow your shader down with more memory reads. In return what do you get? I suppose you can save some vertex buffer storage by deduplicating positions, normals, UVs etc. separately. But I doubt that saves a significant amount of memory in real-world scenarios, and I doubt it's worth the extra complexity and slowness.

Using multiple vertex streams can certainly be useful, e.g. for instancing, or for efficiency in different rendering passes (e.g. shadow map pass needs only positions, so you might keep the positions in a separate stream from everything else, improving cache hit rates for the shadow map pass). But I can't think of anything very interesting to do with multi-index rendering.
reedbeta.com - developer blog, OpenGL demos, and other projects

#5 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2718 posts

Posted 21 November 2012 - 01:58 AM

Another idea, it also would give you this really whacky way to wrap an object discontinuously, like having the texture coordinates in the triangles. :)
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#6 TheNut

    Senior Member

  • Moderators
  • 1695 posts
  • LocationThornhill, ON

Posted 21 November 2012 - 02:52 AM

Yeah, I can't really think of any good reason where multiple index streams would come in handy. Maybe if you wanted to store UVs per polygon instead of per vertex like how all 3D modelling tools work. Although the gain is lost when you have to store another 2 sets of indices and you have to do extra fetches in the vertex shader.
http://www.nutty.ca - Being a nut has its advantages.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users