Join GitHub today
Add neighbor search phase #1
Currently, the neighbor search phase for simulation is disabled. This is crucial for performance with higher particle counts. In order to implement we'll need to figure out one of the following:
So far I've (unsuccessfully) experimented with a few hacks by rewriting the shader to force texture inputs as RW. As expected, this results in lots of crashes
Looking through the VFX graph source, it seems adding a buffer may be possible, but there is no API for this at all. We'd need to hook into/patch the data at a pretty low level before it gets sent to the engine. Right now all of these are very internal, so I've held off here in the hopes that a solution will manifest on Unity's end.
Solution 2 may work, but the biggest issue here is the differences in size between partitioning structure (grid or linked list), and the neighbor data (sized as a multiplier on particle count). So it is likely that we will need either both solutions 1 and 2, or just solution 1.
I'm open to any thoughts for any of these, or new creative ideas.