Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 16874

Passing data to instancing shader

$
0
0

I have a question about passing per-instance data to my shaders. Currently I am using two vertex buffers to do instancing. The first one is the “true” vertex data and the second one contains one float4x4 per instance, ie. the world matrix. I have been told this is the “old way" of doing things and I should be using a structured buffer or something for the per-instance data instead.

 

I am soon going to have to send more data than just a world matrix to my instances, so I figured I should give the structured buffer approach a try …


Viewing all articles
Browse latest Browse all 16874

Trending Articles