Way to customize Render Queue?

Avatar
  • updated
  • Completed

I hope I can tweak render queue of the shape's shader. As far as I know it's a common way for oragnizing the rendering order, and almost all of the Unity default shaders allow me to manually set the render queue parameter, or tweak it, (Priority parameter on URP shaders, for example). 


But appearently Shape components only provide Sorting Layer options, which are primarilly for 2D rendering. Any plans to support it or any reason Shapes doesn't expose the parameter?

Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Reporting a bug? please specify Render Pipeline:
URP
Pinned replies
Avatar
Freya Holmér creator
  • Answer
  • Completed

This has now been added to 4.1.0 :)

Image 475

Avatar
Yeongho Kim
Quote from Freya Holmér

This has now been added to 4.1.0 :)

Image 475

Wow, appreciate it. Thanks!!

Avatar
Freya Holmér creator
  • Answer
  • Completed

This has now been added to 4.1.0 :)

Image 475

Avatar
Yeongho Kim

Cool, thanks!

Avatar
Freya Holmér creator
  • Under Consideration

I'll consider it yeah! though of course I have to prioritize it all with all the other things I could be working on :)

as for point #3, this would be a bigger change, which would be a bit of a can of worms that I'm not sure I'd want to look into at this moment, but adding a render queue option should be easy enough

Avatar
Yeongho Kim

Could you consider adding it then? In my point of view, letting the users customize Render Queue is quite important:

1. As you may know, Unity Renderer's other than SpriteRenderer don't even expose Sorting Layer options, while most of default materials expose a Render Queue. In other words, for most ongoing 3D projects, when someone want to tweak the rendering order, they will probably depend on Render Queue settings.

2. There are some cases you can't sort rendering geometically. In my case, I use it for rendering silhouettes of characters behind environment objects.

3. I guess you must be very careful not cluttering this beautiful plugin with a bunch of options, but in some sense, it's more applicable than other options you've already added, such as depth offset and Sorting Layer, etc. By the way, I guess the two Shapes in different sorting layer won't be rendered in a single drawcall, right?

Plus, one suggestion, not sure it's possible, but if Shapes can provide a way to generate a set of customizable materials which Shapes can use and let advanced users use them, so they can fully benefit from Shapes in terms of customization and optimization, it would be really great.

Avatar
Freya Holmér creator

render queue is automatically set based on blend mode, but there's currently no way to change the order on a per-shape basis.

I could add it - but mind that doing this will break instancing, as this will change the render state of the material, just like changing the depth offset/stencil settings, so usually you don't want to do this if you can use other methods such as sorting based on a specific axis etc

Avatar
Yeongho Kim

Any guidelines or opinions? I've already been using some shaders dependent on Render Queue order and I hope I can use Shapes consistently with them.