Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How can I filter a Layer in URP 2D Renderer?

Discussion in 'General Discussion' started by mamup11, Jan 21, 2022.

Thread Status:
Not open for further replies.
  1. mamup11

    mamup11

    Joined:
    Nov 13, 2021
    Posts:
    1
    Hi All,

    I've been following a lot of tutorials about creating custom rendering effects (Like this example https://docs.unity3d.com/Packages/c...ures/how-to-custom-effect-render-objects.html) but I want to archive something similar on 2D, where I want a layer to not be rendered unless the objects in that layer intercepts with a field of view.

    I could do this using a Universal Renderer Data, but using that renderer all the 2D lights stop working, I wanted to replicate the same on the Renderer 2D Data but with this configuration I cannot filter layers to not be rendered.

    Is there a solution to be able to filter out layers in the Renderer 2D?
     
  2. progdamn

    progdamn

    Joined:
    Sep 12, 2020
    Posts:
    2
    You haven't found the answer yet, how to do it?
     
  3. TresLove

    TresLove

    Joined:
    Apr 15, 2021
    Posts:
    1
    I know it has been around a year and a half since this post, however I am running into similar issues in a project where I need to filter layers out in order to draw them later using stencil buffers for a fov effect. However, as mentioned above the URP 2d renderer data asset seems to be missing a filtering option like the universal one has, and lights seem to stop functioning when using universal rendering data instead of 2d data.

    Here's the function I want to use on the 2d renderer: upload_2023-7-10_20-55-39.png

    Has anyone found a solution to this question yet, or is there an easier way to create a field of view effect?
     
  4. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,763
  5. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,745
    The amusing thing here is that Darkwood was already made in Unity, it's just that they used the built-in render pipeline because it was all that was available at the time. Frankly, I wouldn't be surprised if they used it even if they made the game today because it's actually reasonably easy to accomplish things like this in it.
     
    Unifikation likes this.
  6. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,763
    Kinda been a theme lately. New features are more complex to use, less documented, less explored by other users who are fragmented between legacy, some option 1, some option 2 and maybe even option 3. Even aarthificial was struggling and he's a top tier engineer. Although, this is perhaps because 2D lighting in Unity is incredibly basic and doesn't really consider anything but the most basic of use cases.

    Somehow Unity is growing more obscure despite having vastly more workforce and resources than ever before. You get a lot of power that also comes with some loss of productivity. Perhaps, when legacy systems will be removed, Unity will regain coherence and we'll rebuild the knowledge base.
     
  7. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,043
    And a lot of compromises of the showstopping type in URP - "you can have this, but not that"...
     
  8. alexx21912

    alexx21912

    Joined:
    Jul 14, 2023
    Posts:
    2
    I also need help in custom rendering effects. Above URP 2d renderer is missing filter option. Can you please advice?
     
  9. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,513
    Then please use the appropriate support forums. General Discussion is not a support forum as its description states.

    There's a URP forum for URP questions which is easy to find.

    Thanks.
     
    Ryiah likes this.
Thread Status:
Not open for further replies.