Search Unity

Question Override Culling Mask in ScriptableRenderContext.DrawRenderers

Discussion in 'Universal Render Pipeline' started by Magmaw, Jun 2, 2023.

  1. Magmaw

    Magmaw

    Joined:
    Aug 13, 2019
    Posts:
    7
    Hi

    I'm making a render feature to render objects on the FirstPerson layer on top of everything and at a fixed FOV without using a second camera. I want to render just the objects on the FirstPerson layer with ScriptableRenderContext.DrawRenderers by passing in a FilteringSettings with my layer mask set. The issue is it's not rendering anything because the camera's culling mask doesn't include that layer.

    Is there any way to override the camera's culling mask for drawing objects with DrawRenderers, rather than the FilteringSettings mask only narrowing down the camera culling mask further?

    Thanks
    (I'm in URP 14.0.7)