Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question [URP] Pre/post events for advanced RenderObjects overrides

Discussion in 'Unity 6 Beta' started by BragBiscuitz, Mar 24, 2024.

  1. BragBiscuitz

    BragBiscuitz

    Joined:
    Mar 29, 2020
    Posts:
    7
    Hello. I'm trying to improve the scalability of a "non-euclidean" portal system I've been working on by transitioning to using the stencil buffer on the main camera with additional passes for recursive rendering. I just need to override and restore camera settings (transform, projection matrix, and near clip plane), and I need to do it at runtime before and after each portal pass because of the dynamic context, but I haven't been able to find sorts of events where I could plug in these overrides via code.

    RenderObjects in the editor seem to allow to do some basic camera overrides (and optionally restore after rendering the pass), but I haven't seen a way to do it via code without creating the entire pass, which is way more than I need or want.

    So I guess my question is, does such a way exist or is planned to be added?