How do I specify the order in which objects and Visual Effect Graph are drawn?

Hello,
I am using Visual Effect Graph and I would like to specify the order of VFX drawing between objects.

What I have tried is below, but is there a solution?

situation

Although the position is as follows,

Sphere FX will appear in the foreground.

This is what happens when the material of the Sphere and Cube objects is a Transparent Alpha.

What I tried

Material Sorting Priority affected the order in which materials were rendered to each other,
image
but not the order in which VFX and materials were rendered to each other.

I tried to apply Shader Graph to Visual Effect Graph by referring to this page.

However, I could not find Depth Offset.

Sorting Layer is the recognition of the drawing order in the sprite renderer.
Therefore, it should not matter.
image

Do you have any tips for us?


Unity 6 Preview: 6000.0.17f1
Visual Effect Graph: 17.0.3
Shader Graph: 17.0.3

Solution.

I changed the Sorting Layer in Additional Settings back to Default,
image

After changing the Sorting Priority of the material for which I wanted to change the drawing order, I was able to arbitrarily change the back and forth relationship between the object and the VFX.
image

If -27, it was drawn before VFX, if -28, it was drawn behind VFX. We do not know the basis for these values.

Morning. I’m glad that you found a solution.
If you want more detail on how sorting work in VFX Graph, both Per-particle sorting, Output Sorting or Sorting between VFX instance I would recommend that you take a look at those two posts:

Post A
Post B

You seem to have different VFX instances, so the position of your VFX should definitely influence the sorting of your VFX instance. Now, how you can see in the post mentioned above, the Bounding Box of your VFX is what’s considered.

I hope that it will help you and that you’ll be able to reach your goal.
Have a lovely day.

1 Like

I hadn’t realized the Bounding Box was influencing the sorting.
Thank you for the very helpful information!

1 Like