Search Unity

Order of RendererFeatures execution?

Discussion in 'Universal Render Pipeline' started by Claytonious, Jan 4, 2020.

  1. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    904
    When we are using instances of the RenderObjects RendererFeature, there is an "event" property that controls when the feature is rendered relative to others. But when multiple RenderObjects features are triggered by the same event, then what order do they execute in, and can we control that ordering? For example, here we have two RenderObjects features that are both triggered by "Before Rendering Opaques":



    Are they executed in the order shown here in the inspector? Or something else? How can we change the order?

    Thanks!
     
  2. Elvar_Orn

    Elvar_Orn

    Unity Technologies

    Joined:
    Dec 9, 2019
    Posts:
    162
    Hey,
    They are executed in the order you have in the Renderer Feature List.

    If you want to change the order, select one of the items so it turns blue (Sometimes a bit bothersome to select it so I usually click a little left of the "Name" label) and move it up or down.

    You can make sure that they're being drawn in the order you want by opening up the Frame Debugger.

    Here's an example:
     

    Attached Files:

    Last edited: Jan 5, 2020
    colin299 and Claytonious like this.
  3. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    904
    I had tried to drag to reorder them for many minutes and never realized they could be selected to turn blue in this way. I shall try when back at a keyboard. Thank you @ElvarOrnUnnthorsson !
     
    Elvar_Orn likes this.