Skip to main content
gamedev.net
🔒 Locked

Multiple Input Streams

Started by Quat Sep 8, 2010 at 12:02 PM 0 replies 650+ views
Original Post
Quat
Quat
In Direct3D you can supply multiply vertex stream sources, and Direct3D will put those together to assemble the vertices. What are some applications of this? So far I just use one stream source.

The only thing I can think of is that some effects do not need all the vertex info. For example, to draw depth, you only need the position element. So you could just bind the "position" stream source when drawing depth. Then for regular drawing, you can bind the "position", "normal", and etc. streams.

On the other hand, you could still use one stream source for both drawing depth and regular drawing and the depth shaders just ignore the other vertex components.

Is one way better than the other?

-----Quat
Demirug
Demirug
One usage for multiple streams is instancing where the per instance data is delivered b a separate stream.

Splitting the vertex data for different usages can help if the vertex fetch is our bottleneck. As GPUs loads cache lines they will although load the unused elements. If you have a very simple shader and cull many primitives early it’s possible that you cannot read fast enough when there is to much “garbage” between the used data. This could happen during depth or shadow map passes.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.