Sorting/Rendering Order between shape and unity mesh renderer

Avatar
  • updated

Hey,

I'm just wondering if you can simply set the rendering order of a shape (in my case polylines) and a normal unity object with a mesh renderer. I.e. when the polyline cuts through the object I want it to be fully seen anyway. Changing the Sorting Order above the Priority of the objects mesh renderer does not change anything. The only thing that kind of worked was changing the depth test factor. However that seems to be too impactful on performance.

https://acegikmo.com/shapes/docs/#draw-order suggests you can simply resort, as shapes should behave like normal mesh renderers?

Thanks!

Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Reporting a bug? please specify Render Pipeline:
HDRP
Avatar
Freya Holmér creator

mind that the blending mode also affects this, since opaque objects render before all other blend modes, I'd double check those to

Avatar
Sthomas

Yes, I checked them, but no difference.

Could it be, that only 2D objects get sorted via Sorting Oder? Since Unitys native 2D objects use a similar named sorting.

Avatar
Freya Holmér creator

it's possible, though it did work in my tests, but I was in built-in RP, not HDRP, it's possible there are some differences in how they use those values