Using vertex buffer instancing, how to dynamically change separate instance position?
问题 I need to draw million cubes. Cubes has the same vertex array, but may have different scale/position/rotation. Important: they may change their position dynamically, after vertex buffer creation. Some of them should be connected by the line. So I also need to draw lines. Currently I deal with the instancing using constant buffer: VertexShader.hlsl struct VS_INPUT { float4 pos: POSITION; float4 colour: COLOUR; uint InstanceID: SV_InstanceID; } cbuffer ConstantBuffer : register(b0) { float4x4