What are multiple Vertex Streams used for?
Crossbones+ - Reputation: 1176
Posted 30 May 2010 - 09:51 AM
You bind your model's VB to stream 0, and the per-instance data to stream 1.
There are some examples in the DirectX SDK.
Members - Reputation: 296
Posted 30 May 2010 - 01:01 PM
I'm sure there are other uses you could contrive, but instancing is what it's all about. You should try it - and lol when you see how many of the same object you can render without dropping your fps.
Members - Reputation: 806
Posted 30 May 2010 - 10:05 PM
Original post by Rubicon
I'd go further and suggest that proper instancing is why they were invented.
Multiple streams appeared in D3D8, while instancing only appears in D3D9, so that's definitely not the case. Still, I agree that instancing is the most obvious use.
One way I used multiple streams (in the old days) was for tweening.
Members - Reputation: 457
Posted 30 May 2010 - 10:09 PM
Your first stream has X,Y coordinates and contains all vertices necessary for a 2d grid of one terrain sector. In a second stream you have the actual height stored. This way you can save quite some graphics memory since the first stream is the same for every terrain tile.