Change VFX Graph render queue position

Hello everybody.

I’m trying to change the render queue position of a VFX Graph, like you would with a material. It works fine with Shuriken, since I can assign a material with a certain render queue position, but obviously materials cannot be used in VFX Graph. Is there some solution to this issue?

Update: It appears a possible solution would be to adjust the render queue of the Shader Graph. Still, I can’t make it work, since the changes I make in the associated script won’t be saved for some reason.

In the Inspector of the Shader Graph Asset, I click on “View Generated Shader”, then in the code under TAGS, I change “Queue” = “Transparent” to “Queue” = “Transparent+2000”. When I close the script and open it again, it’s reset to “Queue” = “Transparent”.

Morning.
In VFX Graph you can change the Sort Priority. When using transparent material, this integer can allow you to apply an offset to the rendering order. This setting is the equivalent of the Material Sorting Priority in HDRP or URP. You can change this value between -50 and 50.
This setting can be found in the inspector by selecting an Output Context with a transparent material.

9489316--1335466--upload_2023-11-23_14-46-30.png
Note: in URP, Sorting Priority is visible in Opaque Material and also with VFX Graph opaque output but are not
used if I’m correct.

So without using a Shadergraph you should be able to adjust the Render order of VFX using transparent materials.
In HDRP, you also have a Mesh Renderer Priority. This Priority settings allow you to sort Renderers using the same Material in your Scene.

This option is also available for VFX Graph with an HDRP project. You can it in the inspector when selecting a VFX in your Hierarchy panel.
9489316--1335469--upload_2023-11-23_14-49-7.png

Together these sorting priority settings should allow you to offset the rendering order between Material (HDRP/URP) and within a group of VFX with the same materials (HDRP).

To finish, here is a small screenshot of the sorting feature comparison between Built-in/URP and HDRP.
9489316--1335487--upload_2023-11-23_14-59-19.png

Hope this will help you get your VFX sorted.

1 Like