Overlay transparent custom shader over Shapes

Avatar
  • updated
  • Answered

I am making this custom green rotation shader which is attached to a plane hovering over the plane of the doors and windows which are drawn using Shapes. I can't get the green bar to appear above the shapes; any thoughts?
The blending mode of the green shader on the screenshot attached is as below but the same issue occurs when the blending is opaque

Blend SrcAlpha OneMinusSrcAlpha // Traditional transparency
ZWrite off

Image 590

Reporting a bug? please specify Unity version:
2017.1.17f1
Reporting a bug? please specify Shapes version:
Reporting a bug? please specify Render Pipeline:
URP
Avatar
Freya Holmér creator
  • Answered

this depends if it's drawn in immediate mode or using Shapes components - the documentation, under draw order, lists how sorting works. is there anything here you feel is missing?

https://acegikmo.com/shapes/docs/#draw-order

Avatar
yaoyi fan
Quote from Freya Holmér

this depends if it's drawn in immediate mode or using Shapes components - the documentation, under draw order, lists how sorting works. is there anything here you feel is missing?

https://acegikmo.com/shapes/docs/#draw-order

Thanks! Let me look into that. I'm using immediate mode.
Excellent, the documentation is very clear as always. I just had to specify the second argument of Draw.Command() in the ImmediateModeShapeDrawer class to do the trick

RenderPassEvent.BeforeRenderingTransparent