Component Shapes and Camera Events

Avatar
  • updated
  • Answered

We just moved from drawing all our Shapes content in immediate mode to using components. In immediate mode we were able to specify the camera event when we wanted to draw them (we chose "Before Image Effects"). Now when using components we can't find an option to select the same camera mode. Shapes seems to draw them after our Post-processing scripts run, which changes our colors and other effects from what we had been using. 

Is it possible to define when a Shapes component draws according to camera events?

Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Reporting a bug? please specify Render Pipeline:
Built-in render pipeline
Pinned replies
Avatar
Freya Holmér creator
  • Answer
  • Answered

Component shapes work just like any other mesh renderers, which means they don't have a camera injection point.

Instead, they use sorting layers and sorting order, along with the render queue of the shaders (again like any other scene objects in Unity). Almost all Shapes use the Transparent render queue, except the opaque blend mode, which uses the Geometry queue. So whether or not you can draw shapes before/after post processing all depends on when and how your post processing happens in relation to mesh renderers.

It's weird that shapes seem to draw after post processing though, I would expect them all to be before. It sounds like something might be strange in how the post processing was set up, or something with the cameras perhaps?

Avatar
Freya Holmér creator
  • Answer
  • Answered

Component shapes work just like any other mesh renderers, which means they don't have a camera injection point.

Instead, they use sorting layers and sorting order, along with the render queue of the shaders (again like any other scene objects in Unity). Almost all Shapes use the Transparent render queue, except the opaque blend mode, which uses the Geometry queue. So whether or not you can draw shapes before/after post processing all depends on when and how your post processing happens in relation to mesh renderers.

It's weird that shapes seem to draw after post processing though, I would expect them all to be before. It sounds like something might be strange in how the post processing was set up, or something with the cameras perhaps?