Impressive work, I'm still trying to make sense of some of the math and the approach, but this looks very promising after an initial review of the code, demos, and research paper.
A few questions:
Have you considered running force calculations in an offscreen canvas instance and/or maybe a worker? If so did you notice a further speedup in the time to calculate the forces?
Have you considered using something like GPU.js as a fallback mechanism for browsers and platforms that do not support WebGPU currently?
Have you considered collaborating with a project like Deck.gl to bring this approach to a larer ecosystem that has just started exploring moving from WebGL to WebGPU?
Thank you, appreciate the compliments, here are my thoughts:
We did experiment with running benchmarks with no onscreen canvas, but results were pretty much the same because the time to render to the canvas each frame is mostly negligible compared to the time to calculate forces. We did not experiment with using a worker, it would be interesting but the time taken doing work on the CPU is very small compared to the work of calculating forces or rendering large graphs on the GPU.
We hadn't really considered GPU.js, I'm sure someone could port this graph layout algorithm to use GPU.js, but it may lead to new limitations they have to consider since GPU.js uses WebGL2 as its backend, which doesn't have native support for some GPGPU functionalities like WebGPU does.
Considering bringing this approach to a larger ecosystem, the scope of this project was just to show the possibility of a WebGPU graph layout implementation for research purposes. It would be awesome if anyone wanted to use the code here to integrate GPU-powered graph layouts into a more mature library like Deck.gl, but sadly as a PhD student I don't really have time to lead the engineering effort required. The code is available to all though, if any developers are interested they have our full support :)
Impressive work, I'm still trying to make sense of some of the math and the approach, but this looks very promising after an initial review of the code, demos, and research paper.
A few questions: