I am working on molecular modelling and simulations with millions of molecules. I am calculating transform data for many objects (>100,000) in a compute shader. Right now I’m drawing them using a UInstanceStaticMeshComponent (ISMC).
It seems a little silly to copy the data computed by the compute shader, back to the CPU, just to upload it back to the GPU again through an ISMC. This incurs too much overhead. Is there a better way?
Has anyone tried something like this? For 100,000 objects it’s too slow to go through ISMC. I would like something more direct. I can’t seem to find where ISMC keeps its buffers, so that I might bind them to my compute shaders. ISMC is a large and complicated set of classes, at least for my little brain.
In Unity, this is really easy with Graphics.DrawMeshInstancedIndirect, which keeps everything on the GPU. Is there something like this in Unreal?