VFX Graph Painting with particles

Morning. So the second display isn’t really necessary. It’s mainly used here so that it’s easy to debug and see all at once. The UV’s pass, the particles, etc. This could be rendered to a small render texture and sampled in VFX Graph almost the same way.

Sadly, I’m not too familiar with Render Graph. I’m still picking up with Unity, having spent most of my game development career with Unreal. So there are still many areas of Unity that I need to discover more about.
When it comes to performances, I would say that it’s often a matter of context: target platform, current scene, project, etc. So I think it’s always best to profile it in your context, scenario, and specific needs.

Usually, we try to avoid round-tripping between GPU and CPU, especially with gameplay, but it can work. This solution has the advantage that VFX graph data comes from either the depth and color buffer of the custom UV pass. Therefore, I might be wrong, but it shouldn’t be more expensive to get the information from a higher-resolution mesh or even several meshes.

Now, regarding accessing the Triangle Index, this was initially the goal that I was going for. I’ve been able to make it work and will explain it in the original thread, but this involves for-loop on the GPU, which isn’t ideal with the parallel nature of the GPU. Putting it briefly, my colleagues didn’t recommend doing this :sweat_smile:

Don’t hesitate to share your experiment :slight_smile: